wes

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultEndpoint = ""
	DefaultBasePath = "/api/ga4gh/wes/v1"
	DefaultTimeout  = 10
	DefaultRetry    = 2
)

Variables

This section is empty.

Functions

func IsBadRequest

func IsBadRequest(err error) bool

IsBadRequest ...

func IsNotFound

func IsNotFound(err error) bool

IsNotFound ...

Types

type CancelRunRequest

type CancelRunRequest struct {
	RunID string
}

CancelRunRequest ...

type CancelRunResponse

type CancelRunResponse struct {
	RunID string `json:"run_id"`
}

CancelRunResponse ...

type Client

type Client interface {
	ListRuns(ctx context.Context, req *ListRunsRequest) (*ListRunsResponse, error)
	RunWorkflow(ctx context.Context, req *RunWorkflowRequest) (*RunWorkflowResponse, error)
	GetRunLog(ctx context.Context, req *GetRunLogRequest) (*GetRunLogResponse, error)
	CancelRun(ctx context.Context, req *CancelRunRequest) (*CancelRunResponse, error)
}

Client ...

func NewClient

func NewClient(options *Options) Client

NewClient ...

type ErrorResp

type ErrorResp struct {
	Msg        string `json:"msg"`
	StatusCode int32  `json:"status_code"`
}

ErrorResp ...

func (ErrorResp) Error

func (e ErrorResp) Error() string

Error ...

type GetRunLogRequest

type GetRunLogRequest struct {
	RunID string
}

GetRunLogRequest ...

type GetRunLogResponse

type GetRunLogResponse struct {
	RunID    string                 `json:"run_id"`
	Request  RunRequest             `json:"request"`
	State    RunState               `json:"state"`
	RunLog   Log                    `json:"run_log"`
	TaskLogs []Log                  `json:"task_logs"`
	Outputs  map[string]interface{} `json:"outputs"`
}

GetRunLogResponse ...

type ListRunsRequest

type ListRunsRequest struct {
	PageSize  *int64
	PageToken *string
	TagFilter *string
}

ListRunsRequest ...

type ListRunsResponse

type ListRunsResponse struct {
	Runs          []RunStatus `json:"runs"`
	NextPageToken string      `json:"next_page_token"`
}

ListRunsResponse ...

type Log

type Log struct {
	Name      string   `json:"name"`
	Cmd       []string `json:"cmd"`
	StartTime *Time    `json:"start_time"`
	EndTime   *Time    `json:"end_time"`
	Stdout    string   `json:"stdout"`
	Stderr    string   `json:"stderr"`
	Log       string   `json:"log"`
	ExitCode  *int32   `json:"exit_code"`
}

Log ...

type Options

type Options struct {
	Endpoint string
	BasePath string
	Timeout  int
	Retry    int
}

func NewOptions

func NewOptions() *Options

NewOptions new an event bus option.

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags add event bus flags

func (Options) Validate

func (o Options) Validate() error

type RunRequest

type RunRequest struct {
	WorkflowParams           map[string]interface{} `json:"workflow_params"`
	WorkflowType             string                 `json:"workflow_type"`
	WorkflowTypeVersion      string                 `json:"workflow_type_version"`
	Tags                     map[string]interface{} `json:"tags"`
	WorkflowEngineParameters map[string]interface{} `json:"workflow_engine_parameters"`
}

RunRequest ...

type RunState

type RunState string

RunState ...

const (
	RunStateUnknown       RunState = "UNKNOWN"
	RunStateQueued        RunState = "QUEUED"
	RunStateInitializing  RunState = "INITIALIZING"
	RunStateRunning       RunState = "RUNNING"
	RunStatePaused        RunState = "PAUSED"
	RunStateComplete      RunState = "COMPLETE"
	RunStateExecutorError RunState = "EXECUTOR_ERROR"
	RunStateSystemError   RunState = "SYSTEM_ERROR"
	RunStateCanceled      RunState = "CANCELED"
	RunStateCanceling     RunState = "CANCELING"
)

run state enum

type RunStatus

type RunStatus struct {
	RunID string   `json:"run_id"`
	State RunState `json:"state"`
}

RunStatus ...

type RunWorkflowRequest

type RunWorkflowRequest struct {
	RunRequest
	WorkflowAttachment map[string]string // the string is file path
}

RunWorkflowRequest ...

type RunWorkflowResponse

type RunWorkflowResponse struct {
	RunID string `json:"run_id"`
}

RunWorkflowResponse ...

type Time

type Time time.Time

Time ...

func (*Time) MarshalJSON

func (t *Time) MarshalJSON() ([]byte, error)

MarshalJSON ...

func (*Time) PointTime

func (t *Time) PointTime() *time.Time

PointTime ...

func (*Time) String

func (t *Time) String() string

String ...

func (*Time) Time

func (t *Time) Time() time.Time

Time ...

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON ...

Jump to

Keyboard shortcuts

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