executors

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequiredKeyValidationError

func NewRequiredKeyValidationError(key string) error

Types

type Context

type Context interface {
	GetString(k string) string
	GetRequiredString(k string) (string, error)
	GetNumber(k string) (uint64, error)
	GetRequiredNumber(k string) (uint64, error)
	GetMap(k string) (map[string]string, error)
	GetList(k string) ([]string, error)
	GetBoolean(k string) (bool, error)
	GetStore() map[string]string
}

func NewExecutorContext

func NewExecutorContext(input map[string]string, store map[string]string) Context

type Executor

type Executor interface {
	Execute(Context) *ExecutorResult
}

type ExecutorContext

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

func (*ExecutorContext) GetBoolean

func (e *ExecutorContext) GetBoolean(k string) (bool, error)

func (*ExecutorContext) GetList

func (e *ExecutorContext) GetList(k string) ([]string, error)

func (*ExecutorContext) GetMap

func (e *ExecutorContext) GetMap(k string) (map[string]string, error)

func (*ExecutorContext) GetNumber

func (e *ExecutorContext) GetNumber(k string) (uint64, error)

func (*ExecutorContext) GetRequiredNumber

func (e *ExecutorContext) GetRequiredNumber(k string) (uint64, error)

func (*ExecutorContext) GetRequiredString

func (e *ExecutorContext) GetRequiredString(k string) (string, error)

func (*ExecutorContext) GetStore

func (e *ExecutorContext) GetStore() map[string]string

func (*ExecutorContext) GetString

func (e *ExecutorContext) GetString(k string) string

type ExecutorResult

type ExecutorResult struct {
	Output map[string]string
	Status pb.TaskExecutionResponseMessage_TaskState
	Error  string
}

func NewExecutorResult

func NewExecutorResult(opts ...ExecutorResultOption) *ExecutorResult

type ExecutorResultOption added in v0.0.4

type ExecutorResultOption func(*ExecutorResult)

func Error

func Error(err error) ExecutorResultOption

func ErrorString

func ErrorString(err string) ExecutorResultOption

func Output

func Output(m map[string]string) ExecutorResultOption

type NonRetryableError

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

func NewNonRetryableError

func NewNonRetryableError(format string, args ...any) *NonRetryableError

func (*NonRetryableError) Error

func (err *NonRetryableError) Error() string

func (*NonRetryableError) Unwrap

func (err *NonRetryableError) Unwrap() error

func (*NonRetryableError) WithCause

func (err *NonRetryableError) WithCause(e error) *NonRetryableError

type RequiredKeyValidationError

type RequiredKeyValidationError string

func (RequiredKeyValidationError) Error

func (err RequiredKeyValidationError) Error() string

type RetryableError

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

func NewRetryableError

func NewRetryableError(format string, args ...any) *RetryableError

func (*RetryableError) Error

func (err *RetryableError) Error() string

func (*RetryableError) Unwrap

func (err *RetryableError) Unwrap() error

func (*RetryableError) WithCause

func (err *RetryableError) WithCause(e error) *RetryableError

Directories

Path Synopsis
tls

Jump to

Keyboard shortcuts

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