Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
apanicker-nflx committed Oct 3, 2018
2 parents 1b9147e + 37a51e3 commit a7a6e32
Show file tree
Hide file tree
Showing 355 changed files with 34,064 additions and 15,457 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ui/dist
ui/package-lock.json
.gradle
.project
bin
build
client/python/conductor.egg-info
*.pyc
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
buildscript {

repositories {
jcenter()
}

dependencies {
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3'
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:4.0.1'
classpath 'org.apache.ant:ant:1.9.7'
}
}
plugins {
id 'nebula.netflixoss' version '5.1.1'
id 'nebula.netflixoss' version '6.0.3'
}

// Establish version and status
Expand All @@ -23,7 +22,6 @@ apply from: "$rootDir/versionsOfDependencies.gradle"
subprojects {

apply plugin: 'nebula.netflixoss'
apply plugin: 'nebula.provided-base'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
Expand All @@ -37,8 +35,10 @@ subprojects {
}

dependencies {
testCompile "junit:junit-dep:${revJUnit}"
testCompile "org.mockito:mockito-all:${revMockito}"
testCompile "junit:junit:${revJUnit}"
testCompile("org.mockito:mockito-core:${revMockito}") {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
}

group = "com.netflix.${githubProjectName}"
Expand Down
1 change: 1 addition & 0 deletions client/gogrpc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor
113 changes: 113 additions & 0 deletions client/gogrpc/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions client/gogrpc/Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true


[[constraint]]
name = "github.com/golang/protobuf"
version = "1.1.0"

[[constraint]]
branch = "master"
name = "golang.org/x/net"

[[constraint]]
name = "google.golang.org/grpc"
version = "1.12.0"

[prune]
go-tests = true
unused-packages = true
non-go = true

[[constraint]]
name = "github.com/stretchr/testify"
version = "1.2.1"
16 changes: 16 additions & 0 deletions client/gogrpc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PROTO_SRC = ../../grpc/src/main/proto

SERVICES = \
$(PROTO_SRC)/grpc/event_service.pb.go \
$(PROTO_SRC)/grpc/metadata_service.pb.go \
$(PROTO_SRC)/grpc/search.pb.go \
$(PROTO_SRC)/grpc/task_service.pb.go \
$(PROTO_SRC)/grpc/workflow_service.pb.go

$(SERVICES): %.pb.go: %.proto
protoc -I $(PROTO_SRC) $< --go_out=plugins=grpc:$(GOPATH)/src

models:
protoc -I $(PROTO_SRC) $(PROTO_SRC)/model/*.proto --go_out=$(GOPATH)/src

proto: models $(SERVICES)
77 changes: 77 additions & 0 deletions client/gogrpc/conductor/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
package conductor

import (
"github.com/netflix/conductor/client/gogrpc/conductor/grpc/tasks"
"github.com/netflix/conductor/client/gogrpc/conductor/grpc/metadata"
"github.com/netflix/conductor/client/gogrpc/conductor/grpc/workflows"
grpc "google.golang.org/grpc"
)

// TasksClient is a Conductor client that exposes the Conductor
// Tasks API.
type TasksClient interface {
Tasks() tasks.TaskServiceClient
Shutdown()
}

// MetadataClient is a Conductor client that exposes the Conductor
// Metadata API.
type MetadataClient interface {
Metadata() metadata.MetadataServiceClient
Shutdown()
}

// WorkflowsClient is a Conductor client that exposes the Conductor
// Workflows API.
type WorkflowsClient interface {
Workflows() workflows.WorkflowServiceClient
Shutdown()
}

// Client encapsulates a GRPC connection to a Conductor server and
// the different services it exposes.
type Client struct {
conn *grpc.ClientConn
tasks tasks.TaskServiceClient
metadata metadata.MetadataServiceClient
workflows workflows.WorkflowServiceClient
}

// NewClient returns a new Client with a GRPC connection to the given address,
// and any optional grpc.Dialoption settings.
func NewClient(address string, options ...grpc.DialOption) (*Client, error) {
conn, err := grpc.Dial(address, options...)
if err != nil {
return nil, err
}
return &Client{conn: conn}, nil
}

// Shutdown closes the underlying GRPC connection for this client.
func (client *Client) Shutdown() {
client.conn.Close()
}

// Tasks returns the Tasks service for this client
func (client *Client) Tasks() tasks.TaskServiceClient {
if client.tasks == nil {
client.tasks = tasks.NewTaskServiceClient(client.conn)
}
return client.tasks
}

// Metadata returns the Metadata service for this client
func (client *Client) Metadata() metadata.MetadataServiceClient {
if client.metadata == nil {
client.metadata = metadata.NewMetadataServiceClient(client.conn)
}
return client.metadata
}

// Workflows returns the workflows service for this client
func (client *Client) Workflows() workflows.WorkflowServiceClient {
if client.workflows == nil {
client.workflows = workflows.NewWorkflowServiceClient(client.conn)
}
return client.workflows
}
Loading

0 comments on commit a7a6e32

Please sign in to comment.