Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionType ¶ added in v1.1.1139
type ExecutionType int
ExecutionType defines the style of execution required for a function e.g. Strongly Typed, or vars Map[string]interface
const ( // ExecutionTypeVars signals a function is loosely typed. ExecutionTypeVars ExecutionType = iota // ExecutionTypeTyped signals a function is strongly typed. ExecutionTypeTyped )
type FnDef ¶ added in v1.1.1139
type FnDef struct { Type ExecutionType Fn any OutMapping map[string]string InMapping map[string]string }
FnDef is a general definition of a function including any mapping needed to call it.
type JobClient ¶
type JobClient interface { LogClient OriginalVars() (input map[string]interface{}, output map[string]interface{}) }
JobClient represents a client that is sent to all service tasks to facilitate logging.
type LogClient ¶
type LogClient interface { // Log logs to the underlying SHAR infrastructure. // Deprecated: Use Logger or LoggerWith to obtain a SHAR slog.Logger instance Log(ctx context.Context, level slog.Level, message string, attrs map[string]string) error // Logger returns a SHAR slog.Logger based on the default logger. This is syntactic sugar around c.LoggerWith(slog.Default()) Logger() *slog.Logger // LoggerWith returns a SHAR slog.Logger based on the provided logger. LoggerWith(logger *slog.Logger) *slog.Logger }
LogClient represents a client which is capable of logging to the SHAR infrastructure.
type MessageClient ¶
type MessageClient interface { LogClient // SendMessage sends a Workflow Message SendMessage(ctx context.Context, name string, key any, vars model.Vars) error }
MessageClient represents a client which supports logging and sending Workflow Messages to the underlying SHAR infrastructure.
type ProcessTerminateFn ¶
type ProcessTerminateFn func(ctx context.Context, vars model.Vars, wfError *model.Error, endState model.CancellationState)
ProcessTerminateFn provides the signature for process terminate functions.
Click to show internal directories.
Click to hide internal directories.