orchestration

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WorkflowFinished

func WorkflowFinished(workflow *api.Workflow) bool

func WorkflowWaitingForExternalBroadcast

func WorkflowWaitingForExternalBroadcast(workflow *api.Workflow) bool

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the client to use to access StakingService APIs.

func NewOrchestrationServiceClient

func NewOrchestrationServiceClient(
	ctx context.Context,
	stakingOpts ...clients.StakingClientOption,
) (*Client, error)

NewOrchestrationServiceClient returns a OrchestrationServiceClient based on the given inputs.

func (*Client) Close

func (s *Client) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*Client) Connection deprecated

func (s *Client) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*Client) CreateWorkflow

func (s *Client) CreateWorkflow(
	ctx context.Context,
	req *api.CreateWorkflowRequest,
	opts ...gax.CallOption,
) (*api.Workflow, error)

CreateWorkflow starts a workflow with the given protocol specific parameters.

func (*Client) GetWorkflow

func (s *Client) GetWorkflow(
	ctx context.Context,
	req *api.GetWorkflowRequest,
	opts ...gax.CallOption,
) (*api.Workflow, error)

GetWorkflow get the current state of a workflow.

func (*Client) ListActions

func (s *Client) ListActions(
	ctx context.Context,
	req *api.ListActionsRequest,
	opts ...gax.CallOption,
) (*api.ListActionsResponse, error)

ListActions lists the Actions supported by Staking API.

func (*Client) ListNetworks

func (s *Client) ListNetworks(
	ctx context.Context,
	req *api.ListNetworksRequest,
	opts ...gax.CallOption,
) (*api.ListNetworksResponse, error)

ListNetworks lists the Networks supported by Staking API.

func (*Client) ListProtocols

func (s *Client) ListProtocols(
	ctx context.Context,
	req *api.ListProtocolsRequest,
	opts ...gax.CallOption,
) (*api.ListProtocolsResponse, error)

ListProtocols lists the Protocols supported by Staking API.

func (*Client) ListStakingTargets

func (s *Client) ListStakingTargets(
	ctx context.Context,
	req *api.ListStakingTargetsRequest,
	opts ...gax.CallOption,
) StakingTargetIterator

ListStakingTargets lists the StakingTargets supported by Staking API.

func (*Client) ListWorkflows

func (s *Client) ListWorkflows(
	ctx context.Context,
	req *api.ListWorkflowsRequest,
	opts ...gax.CallOption,
) WorkflowIterator

ListWorkflows lists the Workflows supported by Staking API.

func (*Client) PerformWorkflowStep

func (s *Client) PerformWorkflowStep(
	ctx context.Context,
	req *api.PerformWorkflowStepRequest,
	opts ...gax.CallOption,
) (*api.Workflow, error)

PerformWorkflowStep helps update workflow move to the next state by returning the signed tx back.

func (*Client) ViewStakingContext

func (s *Client) ViewStakingContext(
	ctx context.Context,
	req *api.ViewStakingContextRequest,
	opts ...gax.CallOption,
) (*api.ViewStakingContextResponse, error)

ViewStakingContext helps view staking context information given a specific network address.

type StakingTargetIterator

type StakingTargetIterator interface {
	// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
	PageInfo() *iterator.PageInfo

	// Next returns the next result. Its second return value is iterator.Done if there are no more
	// results. Once Next returns Done, all subsequent calls will return Done.
	Next() (*api.StakingTarget, error)

	// Response is the raw response for the current page.
	// Calling Next() or InternalFetch() updates this value.
	Response() *api.ListStakingTargetsResponse
}

StakingTargetIterator is an interface for iterating through the response to ListStakingTargets.

type StakingTargetIteratorImpl

type StakingTargetIteratorImpl struct {
	// contains filtered or unexported fields
}

StakingTargetIteratorImpl is an implementation of StakingTargetIterator that unwraps correctly.

func (*StakingTargetIteratorImpl) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*StakingTargetIteratorImpl) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

func (*StakingTargetIteratorImpl) Response

Response is the raw response for the current page. Calling Next() or InternalFetch() updates this value.

type WorkflowIterator

type WorkflowIterator interface {
	// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
	PageInfo() *iterator.PageInfo

	// Next returns the next result. Its second return value is iterator.Done if there are no more
	// results. Once Next returns Done, all subsequent calls will return Done.
	Next() (*api.Workflow, error)

	// Response is the raw response for the current page.
	// Calling Next() or InternalFetch() updates this value.
	Response() *api.ListWorkflowsResponse
}

WorkflowIterator is an interface for iterating through the response to ListWorkflows.

type WorkflowIteratorImpl

type WorkflowIteratorImpl struct {
	// contains filtered or unexported fields
}

WorkflowIteratorImpl is an implementation of WorkflowIterator that unwraps correctly.

func (*WorkflowIteratorImpl) Next

func (n *WorkflowIteratorImpl) Next() (*api.Workflow, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*WorkflowIteratorImpl) PageInfo

func (n *WorkflowIteratorImpl) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

func (*WorkflowIteratorImpl) Response

Response is the raw response for the current page. Calling Next() or InternalFetch() updates this value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL