taskutil

package
v1.1.2155 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSpecFromBytes added in v1.1.913

func LoadSpecFromBytes(c *client.Client, buf []byte) (*model.TaskSpec, error)

LoadSpecFromBytes loads and parses a task.yaml file to a *model.TaskSpec type.

func LoadTaskFromYamlFile added in v1.1.947

func LoadTaskFromYamlFile(ctx context.Context, cl *client.Client, yamlFile string) (string, error)

LoadTaskFromYamlFile registers a service task with a task spec.

func LoadTaskYaml added in v1.1.947

func LoadTaskYaml(ctx context.Context, c *client.Client, taskYaml []byte) (uid string, err error)

LoadTaskYaml registers a service task with a task spec. It returns the unique identifier of the registered task.

func MergeTaskParameter added in v1.1.2120

func MergeTaskParameter(newParams *[]*model.Parameter, oldParams []*model.Parameter)

MergeTaskParameter merges the default values of a task parameter from the old task spec into the new task spec.

func RegisterTaskFunctionFromYaml added in v1.1.947

func RegisterTaskFunctionFromYaml(ctx context.Context, c *client.Client, taskYamlBytes []byte, fn task.ServiceFn) (string, error)

RegisterTaskFunctionFromYaml registers a service task with a task spec from YAML. It first loads and parses the task YAML, and then calls the RegisterTaskFunction method on the client object to register the task.

func RegisterTaskFunctionFromYamlFile added in v1.1.947

func RegisterTaskFunctionFromYamlFile(ctx context.Context, c *client.Client, yamlFile string, fn task.ServiceFn) (string, error)

RegisterTaskFunctionFromYamlFile registers a service task function from a task spec YAML file. It first loads and parses the task YAML, and then calls the RegisterTaskFunction method on the client object to register the task function.

func UpdateServiceTasks added in v1.1.2120

func UpdateServiceTasks(newTasks map[string]*model.TaskSpec, oldTasks map[string]*model.TaskSpec)

UpdateServiceTasks updates the service tasks in the given map with the values from the old map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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