workflow

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteWorkflow added in v0.7.0

func DeleteWorkflow(ctx context.Context, wfClient Client) error

DeleteWorkflow removes the workflow from the api server associated with the workflow client

func GetNamespace added in v0.7.0

func GetNamespace() string

func GetWorkflow added in v0.8.0

func GetWorkflow(ctx context.Context, wc Client) (*v1alpha13.Workflow, error)

func IsFailed added in v0.7.0

func IsFailed(ctx context.Context, wfClient Client) (bool, error)

IsFailed checks if the workflow created by the workflow client is in a failed state

func IsSucceeded added in v0.7.0

func IsSucceeded(ctx context.Context, wfClient Client) (bool, error)

IsSucceeded checks if the workflow created by the workflow client is in a succeeded state

func Run added in v0.7.0

func Run(ctx context.Context, wfClient Client) error

Run calls the generate and Submit commands of the workflow client

func SetFailed added in v0.7.0

func SetFailed(parent *v1alpha1.ApplicationGroup, wfType v1alpha1.WorkflowType, message string)

SetFailed sets one of the workflow conditions in the failed state

func SetProgressing added in v0.7.0

func SetProgressing(parent *v1alpha1.ApplicationGroup, wfType v1alpha1.WorkflowType)

SetProgressing sets one of the workflow conditions in the progressing state

func SetSucceeded added in v0.7.0

func SetSucceeded(parent *v1alpha1.ApplicationGroup, wfType v1alpha1.WorkflowType)

SetSucceeded sets one of the workflow conditions in the succeeded state

func SetSuspended added in v0.7.0

func SetSuspended(wfClient Client)

SetSuspended sets one of the workflow conditions in the suspended state

func Submit added in v0.8.0

func Submit(ctx context.Context, wfClient Client) error

Submit calls the base submit function for the workflow client

func Suspend added in v0.7.0

func Suspend(ctx context.Context, wfClient Client) error

Suspend sets the suspend flag on the workflow associated with the workflow client if the workflow still exists on the cluster

func ToConditionReason added in v0.8.0

func ToConditionReason(nodePhase v1alpha13.WorkflowPhase) string

Types

type Builder added in v0.7.0

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

func NewBuilder added in v0.7.0

func NewBuilder(client client.Client, logger logr.Logger) *Builder

func (*Builder) Build added in v0.7.0

func (builder *Builder) Build(clientType v1alpha1.WorkflowType, appGroup *v1alpha1.ApplicationGroup) Client

func (*Builder) InNamespace added in v0.7.0

func (builder *Builder) InNamespace(namespace string) *Builder

func (*Builder) WithParallelism added in v0.7.0

func (builder *Builder) WithParallelism(numNodes int64) *Builder

func (*Builder) WithStagingRepo added in v0.7.0

func (builder *Builder) WithStagingRepo(stagingURL string) *Builder

type Client added in v0.7.0

type Client interface {
	// Generate the object required by the workflow engine
	Generate(ctx context.Context) error

	// Submit the object required by the workflow engine generated by the Generate method
	Submit(ctx context.Context) error

	// GetType returns the workflow client type
	GetType() v1alpha1.WorkflowType

	// GetLogger returns the logger associated with the workflow client
	GetLogger() logr.Logger

	// GetName returns the name associated with the workflow
	GetName() string

	// GetNamespace returns the namespace that the workflow should run in
	GetNamespace() string

	// GetOptions returns the client options used with the workflow client
	GetOptions() ClientOptions

	// GetClient returns the k8s client associated with the workflow
	GetClient() client.Client

	// GetWorkflow returns the workflow associated with the client
	GetWorkflow() *v1alpha13.Workflow

	// GetAppGroup returns the app group from the workflow client
	GetAppGroup() *v1alpha1.ApplicationGroup
}

func NewClientFromClient added in v0.8.0

func NewClientFromClient(client Client, clientType v1alpha1.WorkflowType) Client

type ClientOptions added in v0.7.0

type ClientOptions struct {
	Parallelism *int64
	StagingRepo string
	Namespace   string
}

type ForwardWorkflowClient added in v0.7.0

type ForwardWorkflowClient struct {
	client.Client
	logr.Logger
	ClientOptions
	// contains filtered or unexported fields
}

func (*ForwardWorkflowClient) Generate added in v0.7.0

func (wc *ForwardWorkflowClient) Generate(ctx context.Context) error

func (*ForwardWorkflowClient) GetAppGroup added in v0.7.0

func (wc *ForwardWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup

func (*ForwardWorkflowClient) GetClient added in v0.7.0

func (wc *ForwardWorkflowClient) GetClient() client.Client

func (*ForwardWorkflowClient) GetLogger added in v0.7.0

func (wc *ForwardWorkflowClient) GetLogger() logr.Logger

func (*ForwardWorkflowClient) GetName added in v0.8.0

func (wc *ForwardWorkflowClient) GetName() string

func (*ForwardWorkflowClient) GetNamespace added in v0.7.0

func (wc *ForwardWorkflowClient) GetNamespace() string

func (*ForwardWorkflowClient) GetOptions added in v0.7.0

func (wc *ForwardWorkflowClient) GetOptions() ClientOptions

func (*ForwardWorkflowClient) GetType added in v0.7.0

func (*ForwardWorkflowClient) GetWorkflow added in v0.7.0

func (wc *ForwardWorkflowClient) GetWorkflow() *v1alpha13.Workflow

func (*ForwardWorkflowClient) Submit added in v0.7.0

func (wc *ForwardWorkflowClient) Submit(ctx context.Context) error

type ReverseWorkflowClient added in v0.7.0

type ReverseWorkflowClient struct {
	client.Client
	logr.Logger
	ClientOptions
	// contains filtered or unexported fields
}

func (*ReverseWorkflowClient) Generate added in v0.7.0

func (wc *ReverseWorkflowClient) Generate(ctx context.Context) error

func (*ReverseWorkflowClient) GetAppGroup added in v0.7.0

func (wc *ReverseWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup

func (*ReverseWorkflowClient) GetClient added in v0.7.0

func (wc *ReverseWorkflowClient) GetClient() client.Client

func (*ReverseWorkflowClient) GetLogger added in v0.7.0

func (wc *ReverseWorkflowClient) GetLogger() logr.Logger

func (*ReverseWorkflowClient) GetName added in v0.8.0

func (wc *ReverseWorkflowClient) GetName() string

func (*ReverseWorkflowClient) GetNamespace added in v0.7.0

func (wc *ReverseWorkflowClient) GetNamespace() string

func (*ReverseWorkflowClient) GetOptions added in v0.7.0

func (wc *ReverseWorkflowClient) GetOptions() ClientOptions

func (*ReverseWorkflowClient) GetType added in v0.7.0

func (*ReverseWorkflowClient) GetWorkflow added in v0.7.0

func (wc *ReverseWorkflowClient) GetWorkflow() *v1alpha13.Workflow

func (*ReverseWorkflowClient) Submit added in v0.7.0

func (wc *ReverseWorkflowClient) Submit(ctx context.Context) error

type RollbackWorkflowClient added in v0.7.0

type RollbackWorkflowClient struct {
	client.Client
	logr.Logger
	ClientOptions
	// contains filtered or unexported fields
}

func (*RollbackWorkflowClient) Generate added in v0.7.0

func (wc *RollbackWorkflowClient) Generate(ctx context.Context) error

func (*RollbackWorkflowClient) GetAppGroup added in v0.7.0

func (*RollbackWorkflowClient) GetClient added in v0.7.0

func (wc *RollbackWorkflowClient) GetClient() client.Client

func (*RollbackWorkflowClient) GetLogger added in v0.7.0

func (wc *RollbackWorkflowClient) GetLogger() logr.Logger

func (*RollbackWorkflowClient) GetName added in v0.8.0

func (wc *RollbackWorkflowClient) GetName() string

func (*RollbackWorkflowClient) GetNamespace added in v0.7.0

func (wc *RollbackWorkflowClient) GetNamespace() string

func (*RollbackWorkflowClient) GetOptions added in v0.7.0

func (wc *RollbackWorkflowClient) GetOptions() ClientOptions

func (*RollbackWorkflowClient) GetType added in v0.7.0

func (*RollbackWorkflowClient) GetWorkflow added in v0.7.0

func (wc *RollbackWorkflowClient) GetWorkflow() *v1alpha13.Workflow

func (*RollbackWorkflowClient) Submit added in v0.7.0

func (wc *RollbackWorkflowClient) Submit(ctx context.Context) error

Jump to

Keyboard shortcuts

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