Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionTerminateFn ¶ added in v1.1.1953
type ExecutionTerminateFn func(state *model.WorkflowState, vars model.Vars) error
ExecutionTerminateFn provides the signature for process terminate functions.
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 FatalErrorListenerFn ¶ added in v1.1.1547
FatalErrorListenerFn is the signature of fatal error listener functions
type FnDef ¶ added in v1.1.1139
type FnDef struct {
Type ExecutionType
Fn any
Partition string
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 model.Vars, output model.Vars)
Headers(ctx context.Context) (map[string]string, error)
CreateTraceSpan(ctx context.Context, spanName string) (context.Context, trace.Span)
Namespace(ctx context.Context) string
}
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
}
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
Headers(ctx context.Context) (map[string]string, error)
CreateTraceSpan(ctx context.Context, spanName string) (context.Context, trace.Span)
Namespace(ctx context.Context) string
}
MessageClient represents a client which supports logging and sending Workflow Messages to the underlying SHAR infrastructure.