task

package
v1.1.1124 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobClient

type JobClient interface {
	LogClient
	OriginalVars() (input map[string]interface{}, output map[string]interface{})
}

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.
	Log(ctx context.Context, level slog.Level, message string, attrs map[string]string) error
}

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
}

MessageClient represents a client which supports logging and sending Workflow Messages to the underlying SHAR infrastructure.

type ProcessTerminateFn

type ProcessTerminateFn func(ctx context.Context, vars model.Vars, wfError *model.Error, endState model.CancellationState)

ProcessTerminateFn provides the signature for process terminate functions.

type SenderFn

type SenderFn func(ctx context.Context, client MessageClient, vars model.Vars) error

SenderFn provides the signature for functions that can act as Workflow Message senders.

type ServiceFn

type ServiceFn func(ctx context.Context, client JobClient, vars model.Vars) (model.Vars, error)

ServiceFn provides the signature for service task functions.

Jump to

Keyboard shortcuts

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