client

package
v1.14.8 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateDAG(id string) (string, error)
	GetDAGSpec(id string) (string, error)
	Grep(pattern string) ([]*persistence.GrepResult, []string, error)
	Rename(oldID, newID string) error
	Stop(workflow *dag.DAG) error
	StartAsync(workflow *dag.DAG, opts StartOptions)
	Start(workflow *dag.DAG, opts StartOptions) error
	Restart(workflow *dag.DAG, opts RestartOptions) error
	Retry(workflow *dag.DAG, requestID string) error
	GetCurrentStatus(workflow *dag.DAG) (*model.Status, error)
	GetStatusByRequestID(workflow *dag.DAG, requestID string) (*model.Status, error)
	GetLatestStatus(workflow *dag.DAG) (*model.Status, error)
	GetRecentHistory(workflow *dag.DAG, n int) []*model.StatusFile
	UpdateStatus(workflow *dag.DAG, status *model.Status) error
	UpdateDAG(id string, spec string) error
	DeleteDAG(id, loc string) error
	GetAllStatus() (statuses []*DAGStatus, errs []string, err error)
	GetAllStatusPagination(params dags.ListDagsParams) ([]*DAGStatus, *DagListPaginationSummaryResult, error)
	GetStatus(dagLocation string) (*DAGStatus, error)
	IsSuspended(id string) bool
	ToggleSuspend(id string, suspend bool) error
	GetTagList() ([]string, []string, error)
}

func New

func New(
	dataStore persistence.DataStores,
	executable string,
	workDir string,
	lg logger.Logger,
) Client

New creates a new Client instance. The Client is used to interact with the DAG.

type DAGStatus

type DAGStatus struct {
	File      string
	Dir       string
	DAG       *dag.DAG
	Status    *model.Status
	Suspended bool
	Error     error
	ErrorT    *string
}

type DagListPaginationSummaryResult

type DagListPaginationSummaryResult struct {
	PageCount int
	ErrorList []string
}

type RestartOptions

type RestartOptions struct {
	Quiet bool
}

type StartOptions

type StartOptions struct {
	Params string
	Quiet  bool
}

Jump to

Keyboard shortcuts

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