tasks

package
v0.0.0-...-c56e726 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: AGPL-3.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TaskDefinitionRegistry = map[string]taskdef.TaskDefinition{}

Task management core

Functions

func FormatTaskFor

func FormatTaskFor(fu *types.TaskFor) (*string, error)

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

func FormatTaskForSimplex(fu *types.TaskFor) string

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 GetPathFromOutput(taskId string, taskdef taskdef.TaskDefinition, outp *types.TaskOutput) string

func ParseTaskFor

func ParseTaskFor(fu string) *types.TaskFor

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 taskdef.TaskDefinition)

Types

This section is empty.

Directories

Path Synopsis
In many cases such as restoring backups, tasks can be quite complex and should/can be broken down into smaller steps
In many cases such as restoring backups, tasks can be quite complex and should/can be broken down into smaller steps
To avoid circular dependencies, taskdef contains the core TaskDefinition
To avoid circular dependencies, taskdef contains the core TaskDefinition
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

Jump to

Keyboard shortcuts

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