taskutil

package
v1.1.1080 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 7 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 RegisterTaskFunctionFromYaml added in v1.1.947

func RegisterTaskFunctionFromYaml(ctx context.Context, c *client.Client, taskYaml []byte, fn client.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 client.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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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