argowf

package
v0.0.0-...-556b52b Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgoClient

type ArgoClient interface {
	GetWorkflowTemplates(ctx context.Context, namespace string) (*GetWorkflowTemplatesResponse, error)
	GetWorkflow(ctx context.Context, namespace string, workflowName string) (*Workflow, error)
	IsPausedWorkflow(ctx context.Context, namespace string, workflowName string) (bool, error)
	GetWorkflowLog(ctx context.Context, namespace string, container string, workflowName string) (logs string, err error)
	GetWorkflows(ctx context.Context, namespace string) (*GetWorkflowsResponse, error)
	SumbitWorkflowFromWftpl(ctx context.Context, wftplName string, opts SubmitOptions) (string, error)
	ResumeWorkflow(ctx context.Context, namespace string, workflowName string) (*Workflow, error)
}

func New

func New(host string, port int, ssl bool, token string) (ArgoClient, error)

New

func NewMock

func NewMock() (ArgoClient, error)

New

type ArgoClientImpl

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

func (*ArgoClientImpl) GetWorkflow

func (c *ArgoClientImpl) GetWorkflow(ctx context.Context, namespace string, workflowName string) (*Workflow, error)

func (*ArgoClientImpl) GetWorkflowLog

func (c *ArgoClientImpl) GetWorkflowLog(ctx context.Context, namespace string, container string, workflowName string) (logs string, err error)

func (*ArgoClientImpl) GetWorkflowTemplates

func (c *ArgoClientImpl) GetWorkflowTemplates(ctx context.Context, namespace string) (*GetWorkflowTemplatesResponse, error)

func (*ArgoClientImpl) GetWorkflows

func (c *ArgoClientImpl) GetWorkflows(ctx context.Context, namespace string) (*GetWorkflowsResponse, error)

func (*ArgoClientImpl) IsPausedWorkflow

func (c *ArgoClientImpl) IsPausedWorkflow(ctx context.Context, namespace string, workflowName string) (bool, error)

func (*ArgoClientImpl) ResumeWorkflow

func (c *ArgoClientImpl) ResumeWorkflow(ctx context.Context, namespace string, workflowName string) (*Workflow, error)

func (*ArgoClientImpl) SumbitWorkflowFromWftpl

func (c *ArgoClientImpl) SumbitWorkflowFromWftpl(ctx context.Context, wftplName string, opts SubmitOptions) (string, error)

type ArgoClientMockImpl

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

func (*ArgoClientMockImpl) GetWorkflow

func (c *ArgoClientMockImpl) GetWorkflow(ctx context.Context, namespace string, workflowName string) (*Workflow, error)

func (*ArgoClientMockImpl) GetWorkflowLog

func (c *ArgoClientMockImpl) GetWorkflowLog(ctx context.Context, namespace string, container string, workflowName string) (string, error)

func (*ArgoClientMockImpl) GetWorkflowTemplates

func (c *ArgoClientMockImpl) GetWorkflowTemplates(ctx context.Context, namespace string) (*GetWorkflowTemplatesResponse, error)

func (*ArgoClientMockImpl) GetWorkflows

func (c *ArgoClientMockImpl) GetWorkflows(ctx context.Context, namespace string) (*GetWorkflowsResponse, error)

func (*ArgoClientMockImpl) IsPausedWorkflow

func (c *ArgoClientMockImpl) IsPausedWorkflow(ctx context.Context, namespace string, workflowName string) (bool, error)

func (*ArgoClientMockImpl) ResumeWorkflow

func (c *ArgoClientMockImpl) ResumeWorkflow(ctx context.Context, namespace string, workflowName string) (*Workflow, error)

func (*ArgoClientMockImpl) SumbitWorkflowFromWftpl

func (c *ArgoClientMockImpl) SumbitWorkflowFromWftpl(ctx context.Context, wftplName string, opts SubmitOptions) (string, error)

type Arguments

type Arguments struct {
	Parameters []struct {
		Name  string `json:"name"`
		Value string `json:"value"`
	} `json:"parameters"`
}

type GetWorkflowTemplatesResponse

type GetWorkflowTemplatesResponse struct {
	Items []WorkflowTemplate `json:"items"`
}

GetWorkflowTemplatesResponse is a response from GET /api/v1/workflow-templates API.

type GetWorkflowsResponse

type GetWorkflowsResponse struct {
	Items []Workflow `json:"items"`
}

type Metadata

type Metadata struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

type SubmitOptions

type SubmitOptions struct {
	DryRun       bool     `json:"dryRun,omitempty"`
	EntryPoint   string   `json:"entryPoint,omitempty"`
	GenerateName string   `json:"generateName,omitempty"`
	Labels       string   `json:"labels,omitempty"`
	Name         string   `json:"name,omitempty"`
	Parameters   []string `json:"parameters,omitempty"`
}

SubmitOptions is optional fields to submit new workflow.

type SubmitWorkflowResponse

type SubmitWorkflowResponse struct {
	Metadata Metadata `json:"metadata"`
}

type Workflow

type Workflow struct {
	ApiVersion string           `json:"apiVersion"`
	Metadata   WorkflowMetadata `json:"metadata"`
	Spec       WorkflowSpec     `json:"spec"`
	Status     WorkflowStatus   `json:"status"`
}

type WorkflowArguments

type WorkflowArguments struct {
	Parameters []struct {
		Name  string `json:"name"`
		Value string `json:"value"`
	} `json:"parameters"`
}

type WorkflowMetadata

type WorkflowMetadata struct {
	ClusterName  string `json:"clusterName"`
	GenerateName string `json:"generateName"`
	Name         string `json:"name"`
	NameSpace    string `json:"namespace"`
}

type WorkflowSpec

type WorkflowSpec struct {
	Args WorkflowArguments `json:"arguments"`
}

type WorkflowStatus

type WorkflowStatus struct {
	Phase    string `json:"phase"`
	Progress string `json:"progress"`
	Message  string `json:"message"`
}

type WorkflowTemplate

type WorkflowTemplate struct {
	Metadata Metadata             `json:"metadata"`
	Spec     WorkflowTemplateSpec `json:"spec"`
}

type WorkflowTemplateSpec

type WorkflowTemplateSpec struct {
	Args Arguments `json:"arguments"`
}

Directories

Path Synopsis
Package mock_argowf is a generated GoMock package.
Package mock_argowf is a generated GoMock package.

Jump to

Keyboard shortcuts

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