Documentation ¶
Index ¶
- Variables
- func FormatTaskFor(fu *types.TaskFor) (*string, error)
- func FormatTaskForSimplex(fu *types.TaskFor) string
- func GetPathFromOutput(taskId string, tInfo *types.TaskInfo, outp *types.TaskOutput) string
- func ParseTaskFor(fu string) *types.TaskFor
- func RegisterTaskDefinition(task TaskDefinition)
- type TaskDefinition
Constants ¶
This section is empty.
Variables ¶
View Source
var TaskDefinitionRegistry = map[string]TaskDefinition{}
Task management core
Functions ¶
func FormatTaskFor ¶
Formats a TaskFor into a string under the 'normal' type. Returns nil if the TaskFor is nil or has an invalid target type
func FormatTaskForSimplex ¶
Formats in 'simplex' form (e.g: user/1234567890).
This is mainly used for Object Storage and should NEVER be used for anything else especially database operations
func GetPathFromOutput ¶
func ParseTaskFor ¶
Parses a TaskFor from a string. Returns nil if the string is invalid.
TaskFor must be in 'normal' (not simplex) form (e.g: u/1234567890).
func RegisterTaskDefinition ¶
func RegisterTaskDefinition(task TaskDefinition)
Types ¶
type TaskDefinition ¶
type TaskDefinition interface { // Validate validates the task and sets up state if needed Validate(state taskstate.TaskState) error // Exec executes the task returning an output if any Exec(l *zap.Logger, tcr *types.TaskCreateResponse, state taskstate.TaskState) (*types.TaskOutput, error) // Returns the info on a task Info() *types.TaskInfo }
TaskDefinition is the definition for any task that can be executed on splashtail
Directories ¶
Path | Synopsis |
---|---|
tasks
|
|
To avoid needing to store the entire state even when not needed, tasks defines a state interface to store and fetch only needed state
|
To avoid needing to store the entire state even when not needed, tasks defines a state interface to store and fetch only needed state |
Click to show internal directories.
Click to hide internal directories.