task

package
v0.1.59 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Started event occurs when the Worker notifies
	// the Coordinator that the task began processing.
	Started = "STARTED"
	// StateChange occurs when a task's state changes.
	// Handler can inspect the job's State property
	// in order to determine what state the task is at.
	StateChange = "STATE_CHANGE"
	// Read occurs when a Task is read by the client
	// through the API.
	Read = "READ"
)

Variables

This section is empty.

Functions

func NoOpHandlerFunc added in v0.1.17

func NoOpHandlerFunc(context.Context, EventType, *tork.Task) error

Types

type EventType added in v0.1.17

type EventType string

type HandlerFunc

type HandlerFunc func(context.Context, EventType, *tork.Task) error

func ApplyMiddleware

func ApplyMiddleware(h HandlerFunc, mws []MiddlewareFunc) HandlerFunc

type HostEnv added in v0.1.22

type HostEnv struct {
	// contains filtered or unexported fields
}

func NewHostEnv added in v0.1.22

func NewHostEnv(vars ...string) (*HostEnv, error)

func (*HostEnv) Execute added in v0.1.22

func (m *HostEnv) Execute(next HandlerFunc) HandlerFunc

type MiddlewareFunc

type MiddlewareFunc func(next HandlerFunc) HandlerFunc

func Redact added in v0.1.17

func Redact(redacter *redact.Redacter) MiddlewareFunc

Jump to

Keyboard shortcuts

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