v1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 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 *stakingpb.Workflow) bool

func WorkflowWaitingForExternalBroadcast

func WorkflowWaitingForExternalBroadcast(workflow *stakingpb.Workflow) bool

Types

type OrchestrationServiceClient

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

OrchestrationServiceClient is the client to use to access StakingService APIs.

func NewOrchestrationServiceClient

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

NewOrchestrationServiceClient returns a OrchestrationServiceClient based on the given inputs.

func (*OrchestrationServiceClient) Close

func (s *OrchestrationServiceClient) Close() error

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

func (*OrchestrationServiceClient) Connection deprecated

func (s *OrchestrationServiceClient) 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 (*OrchestrationServiceClient) CreateWorkflow

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

CreateWorkflow starts a workflow with the given protocol specific parameters.

func (*OrchestrationServiceClient) GetWorkflow

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

GetWorkflow get the current state of a workflow.

func (*OrchestrationServiceClient) ListActions

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

ListActions lists the Actions supported by Staking API.

func (*OrchestrationServiceClient) ListNetworks

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

ListNetworks lists the Networks supported by Staking API.

func (*OrchestrationServiceClient) ListProtocols

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

ListProtocols lists the Protocols supported by Staking API.

func (*OrchestrationServiceClient) ListStakingTargets

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

ListStakingTargets lists the StakingTargets supported by Staking API.

func (*OrchestrationServiceClient) ListWorkflows

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

ListWorkflows lists the Workflows supported by Staking API.

func (*OrchestrationServiceClient) PerformWorkflowStep

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

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

func (*OrchestrationServiceClient) ViewStakingContext

func (s *OrchestrationServiceClient) ViewStakingContext(
	ctx context.Context,
	req *stakingpb.ViewStakingContextRequest,
	opts ...gax.CallOption,
) (*stakingpb.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() (*stakingpb.StakingTarget, error)

	// Response is the raw response for the current page.
	// Calling Next() or InternalFetch() updates this value.
	Response() *stakingpb.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() (*stakingpb.Workflow, error)

	// Response is the raw response for the current page.
	// Calling Next() or InternalFetch() updates this value.
	Response() *stakingpb.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

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