Documentation ¶
Index ¶
- func DeleteWorkflow(ctx context.Context, wfClient Client) error
- func GetNamespace() string
- func GetWorkflow(ctx context.Context, wc Client) (*v1alpha13.Workflow, error)
- func IsFailed(ctx context.Context, wfClient Client) (bool, error)
- func IsSucceeded(ctx context.Context, wfClient Client) (bool, error)
- func Run(ctx context.Context, wfClient Client) error
- func SetFailed(parent *v1alpha1.ApplicationGroup, wfType v1alpha1.WorkflowType, ...)
- func SetProgressing(parent *v1alpha1.ApplicationGroup, wfType v1alpha1.WorkflowType)
- func SetSucceeded(parent *v1alpha1.ApplicationGroup, wfType v1alpha1.WorkflowType)
- func SetSuspended(wfClient Client)
- func Submit(ctx context.Context, wfClient Client) error
- func Suspend(ctx context.Context, wfClient Client) error
- func ToConditionReason(nodePhase v1alpha13.WorkflowPhase) string
- type Builder
- func (builder *Builder) Build(clientType v1alpha1.WorkflowType, appGroup *v1alpha1.ApplicationGroup) Client
- func (builder *Builder) InNamespace(namespace string) *Builder
- func (builder *Builder) WithParallelism(numNodes int64) *Builder
- func (builder *Builder) WithStagingRepo(stagingURL string) *Builder
- type Client
- type ClientOptions
- type ForwardWorkflowClient
- func (wc *ForwardWorkflowClient) Generate(ctx context.Context) error
- func (wc *ForwardWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup
- func (wc *ForwardWorkflowClient) GetClient() client.Client
- func (wc *ForwardWorkflowClient) GetLogger() logr.Logger
- func (wc *ForwardWorkflowClient) GetName() string
- func (wc *ForwardWorkflowClient) GetNamespace() string
- func (wc *ForwardWorkflowClient) GetOptions() ClientOptions
- func (wc *ForwardWorkflowClient) GetType() v1alpha1.WorkflowType
- func (wc *ForwardWorkflowClient) GetWorkflow() *v1alpha13.Workflow
- func (wc *ForwardWorkflowClient) Submit(ctx context.Context) error
- type ReverseWorkflowClient
- func (wc *ReverseWorkflowClient) Generate(ctx context.Context) error
- func (wc *ReverseWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup
- func (wc *ReverseWorkflowClient) GetClient() client.Client
- func (wc *ReverseWorkflowClient) GetLogger() logr.Logger
- func (wc *ReverseWorkflowClient) GetName() string
- func (wc *ReverseWorkflowClient) GetNamespace() string
- func (wc *ReverseWorkflowClient) GetOptions() ClientOptions
- func (wc *ReverseWorkflowClient) GetType() v1alpha1.WorkflowType
- func (wc *ReverseWorkflowClient) GetWorkflow() *v1alpha13.Workflow
- func (wc *ReverseWorkflowClient) Submit(ctx context.Context) error
- type RollbackWorkflowClient
- func (wc *RollbackWorkflowClient) Generate(ctx context.Context) error
- func (wc *RollbackWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup
- func (wc *RollbackWorkflowClient) GetClient() client.Client
- func (wc *RollbackWorkflowClient) GetLogger() logr.Logger
- func (wc *RollbackWorkflowClient) GetName() string
- func (wc *RollbackWorkflowClient) GetNamespace() string
- func (wc *RollbackWorkflowClient) GetOptions() ClientOptions
- func (wc *RollbackWorkflowClient) GetType() v1alpha1.WorkflowType
- func (wc *RollbackWorkflowClient) GetWorkflow() *v1alpha13.Workflow
- func (wc *RollbackWorkflowClient) Submit(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteWorkflow ¶ added in v0.7.0
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 IsFailed ¶ added in v0.7.0
IsFailed checks if the workflow created by the workflow client is in a failed state
func IsSucceeded ¶ added in v0.7.0
IsSucceeded checks if the workflow created by the workflow client is in a succeeded state
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 Suspend ¶ added in v0.7.0
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 (*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) WithParallelism ¶ added in v0.7.0
func (*Builder) WithStagingRepo ¶ added in v0.7.0
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 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 (wc *ForwardWorkflowClient) GetType() v1alpha1.WorkflowType
func (*ForwardWorkflowClient) GetWorkflow ¶ added in v0.7.0
func (wc *ForwardWorkflowClient) GetWorkflow() *v1alpha13.Workflow
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 (wc *ReverseWorkflowClient) GetType() v1alpha1.WorkflowType
func (*ReverseWorkflowClient) GetWorkflow ¶ added in v0.7.0
func (wc *ReverseWorkflowClient) GetWorkflow() *v1alpha13.Workflow
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 (wc *RollbackWorkflowClient) GetAppGroup() *v1alpha1.ApplicationGroup
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 (wc *RollbackWorkflowClient) GetType() v1alpha1.WorkflowType
func (*RollbackWorkflowClient) GetWorkflow ¶ added in v0.7.0
func (wc *RollbackWorkflowClient) GetWorkflow() *v1alpha13.Workflow