workflow

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewParameters

func NewParameters(environmentVariablesString, executeCommand, executeContainerImageURI, targetName, projectName string, cliParameters map[string]string, credentialsToken string, flowType string) map[string]string

NewParameters creates workflow parameters.

Types

type ArgoWorkflow

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

ArgoWorkflow represents an Argo Workflow.

func (ArgoWorkflow) ListStatus added in v0.14.2

func (a ArgoWorkflow) ListStatus(ctx context.Context) ([]Status, error)

List returns a list of workflow statuses.

func (ArgoWorkflow) LogStream

func (a ArgoWorkflow) LogStream(argoCtx context.Context, workflowName string, w http.ResponseWriter) error

LogStream returns a log stream for a workflow.

func (ArgoWorkflow) Logs

func (a ArgoWorkflow) Logs(ctx context.Context, workflowName string) (*Logs, error)

Logs returns logs for a workflow.

func (ArgoWorkflow) Status

func (a ArgoWorkflow) Status(ctx context.Context, workflowName string) (*Status, error)

Status returns a workflow status.

func (ArgoWorkflow) Submit

func (a ArgoWorkflow) Submit(ctx context.Context, from string, parameters map[string]string, workflowLabels map[string]string) (string, error)

Submit submits a workflow execution.

type CreateWorkflowResponse

type CreateWorkflowResponse struct {
	WorkflowName string `json:"workflow_name"`
}

CreateWorkflowResponse creates a workflow response.

type Logs

type Logs struct {
	Logs []string `json:"logs"`
}

Logs represents workflow logs.

type Status

type Status struct {
	Name     string `json:"name"`
	Status   string `json:"status"`
	Created  string `json:"created"`
	Finished string `json:"finished,omitempty"`
}

Status represents a workflow status.

type Workflow

type Workflow interface {
	ListStatus(ctx context.Context) ([]Status, error)
	Logs(ctx context.Context, workflowName string) (*Logs, error)
	LogStream(ctx context.Context, workflowName string, data http.ResponseWriter) error
	Status(ctx context.Context, workflowName string) (*Status, error)
	Submit(ctx context.Context, from string, parameters map[string]string, labels map[string]string) (string, error)
}

Workflow interface is used for interacting with workflow services.

func NewArgoWorkflow

NewArgoWorkflow creates an Argo workflow.

Jump to

Keyboard shortcuts

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