Documentation
¶
Index ¶
- func Error(err error) executorResultOption
- func ErrorString(err string) executorResultOption
- func Output(m map[string]any) executorResultOption
- func Status(s pb.TaskExecutionResponseMessage_TaskState) executorResultOption
- type Context
- type Enumer
- type Executor
- type ExecutorContext
- func (e *ExecutorContext) GetBoolean(k string) (bool, error)
- func (e *ExecutorContext) GetInput() cache.MapCache[string, string]
- func (e *ExecutorContext) GetList(k string) ([]string, error)
- func (e *ExecutorContext) GetMap(k string) (map[string]string, error)
- func (e *ExecutorContext) GetNumber(k string) (uint64, error)
- func (e *ExecutorContext) GetRequiredNumber(k string) (uint64, error)
- func (e *ExecutorContext) GetRequiredString(k string) (string, error)
- func (e *ExecutorContext) GetStore() cache.MapCache[string, string]
- func (e *ExecutorContext) GetString(k string) string
- type ExecutorCreationError
- type ExecutorResult
- type ExecutorStatus
- type ExecutorType
- type InvalidHttpMethodError
- type NonRetryableError
- type RequiredKeyValidationError
- type RetryableError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorString ¶
func ErrorString(err string) executorResultOption
func Status ¶
func Status(s pb.TaskExecutionResponseMessage_TaskState) executorResultOption
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) GetInput() cache.MapCache[string, string] GetStore() cache.MapCache[string, string] }
type Executor ¶
type Executor interface {
Execute(ctx ExecutorContext) *ExecutorResult
}
type ExecutorContext ¶
type ExecutorContext struct {
// contains filtered or unexported fields
}
func NewExecutorContext ¶
func NewExecutorContext(input map[string]string, store map[string]string) ExecutorContext
func (*ExecutorContext) GetBoolean ¶
func (e *ExecutorContext) GetBoolean(k string) (bool, error)
func (*ExecutorContext) GetInput ¶ added in v0.0.1
func (e *ExecutorContext) GetInput() cache.MapCache[string, string]
func (*ExecutorContext) GetMap ¶
func (e *ExecutorContext) GetMap(k string) (map[string]string, 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() cache.MapCache[string, string]
func (*ExecutorContext) GetString ¶
func (e *ExecutorContext) GetString(k string) string
type ExecutorCreationError ¶
type ExecutorCreationError struct {
// contains filtered or unexported fields
}
func NewExecutorCreationError ¶
func NewExecutorCreationError(t pb.TaskType) *ExecutorCreationError
func (*ExecutorCreationError) Error ¶
func (err *ExecutorCreationError) Error() string
type ExecutorResult ¶
type ExecutorResult struct { Output map[string]any Status pb.TaskExecutionResponseMessage_TaskState Error string }
func NewExecutorResult ¶
func NewExecutorResult(opts ...executorResultOption) *ExecutorResult
type ExecutorStatus ¶
type ExecutorStatus uint
const ( ExecutorStatus_UNKNOWN ExecutorStatus = iota ExecutorStatus_COMPLETED ExecutorStatus_FAILED_RETRYABLE ExecutorStatus_FAILED_NON_RETRYABLE )
func (ExecutorStatus) Ordinal ¶
func (es ExecutorStatus) Ordinal() uint
func (ExecutorStatus) String ¶
func (es ExecutorStatus) String() string
type ExecutorType ¶
type ExecutorType uint
const ( ExecutorType_UNKNOWN ExecutorType = iota ExecutorType_VOID ExecutorType_HTTP ExecutorType_SCRIPT ExecutorType_KUBERNETES_API_REQUEST )
func (ExecutorType) Ordinal ¶
func (e ExecutorType) Ordinal() uint
func (ExecutorType) String ¶
func (t ExecutorType) String() string
type InvalidHttpMethodError ¶
type InvalidHttpMethodError struct {
// contains filtered or unexported fields
}
func NewInvalidHttpMethodError ¶
func NewInvalidHttpMethodError(m string) *InvalidHttpMethodError
func (*InvalidHttpMethodError) Error ¶
func (err *InvalidHttpMethodError) Error() string
type NonRetryableError ¶
type NonRetryableError struct {
// contains filtered or unexported fields
}
func NewNonRetryableError ¶
func NewNonRetryableError(msg string) *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 struct {
// contains filtered or unexported fields
}
func NewRequiredKeyValidationError ¶
func NewRequiredKeyValidationError(key string) *RequiredKeyValidationError
func (*RequiredKeyValidationError) Error ¶
func (err *RequiredKeyValidationError) Error() string
type RetryableError ¶
type RetryableError struct {
// contains filtered or unexported fields
}
func NewRetryableError ¶
func NewRetryableError(msg string) *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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.