task

package
v0.1.161 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 task's State property
	// in order to determine what state the task is at.
	StateChange = "STATE_CHANGE"
	// Redelivered event occurs when a task is redelivered.
	Redelivered = "REDELIVERED"
	// Progress event occurs when a task's progress changes.
	Progress = "PROGRESS"
	// 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

func Webhook added in v0.1.62

Jump to

Keyboard shortcuts

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