This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
355 changed files
with
34,064 additions
and
15,457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ ui/dist | |
ui/package-lock.json | ||
.gradle | ||
.project | ||
bin | ||
build | ||
client/python/conductor.egg-info | ||
*.pyc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/vendor |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.