Help us shape the future of Go! Take the 2026 Go Developer Survey

worker

package
v0.96.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 31 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func At deprecated

func At(t ...time.Time) scheduled

Deprecated: At is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func Cron deprecated

func Cron(c string) cron

Deprecated: Cron is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func Crons deprecated

func Crons(c ...string) cronArr

Deprecated: Crons is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func Event deprecated

func Event(e string) event

Deprecated: Event is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func Events deprecated

func Events(events ...string) eventsArr

Deprecated: Events is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func IsNonRetryableError deprecated

func IsNonRetryableError(err error) bool

Deprecated: IsNonRetryableError is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func NewNonRetryableError deprecated

func NewNonRetryableError(err error) error

Deprecated: NewNonRetryableError is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func NoTrigger deprecated

func NoTrigger() noTrigger

Deprecated: NoTrigger is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func SetContextDurableHooks added in v0.83.58

func SetContextDurableHooks(ctx HatchetContext, hook DurableEvictionHook, listener *client.DurableTaskListener, supportsEviction bool)

SetContextDurableHooks attaches eviction and durable-task infrastructure to ctx. Pass nil hook and nil listener to clear. Intended for internal SDK use only.

Types

type Action deprecated

type Action interface {
	// Name returns the name of the action
	Name() string

	// Run runs the action
	Run(args ...any) []any

	MethodFn() any

	ConcurrencyFn() GetWorkflowConcurrencyGroupFn

	// Service returns the service that the action belongs to
	Service() string

	Compute() *compute.Compute
}

Deprecated: Action is an internal interface used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type ActionMap deprecated

type ActionMap map[string]ActionWithCompute

Deprecated: ActionMap is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type ActionRegistry deprecated

type ActionRegistry map[string]Action

Deprecated: ActionRegistry is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type ActionWithCompute deprecated

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

Deprecated: ActionWithCompute is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type DurableEvictionHook added in v0.83.58

type DurableEvictionHook interface {
	// MarkWaiting signals that the run identified by key has entered a waiting state.
	// waitKind describes what the run is waiting on; resourceID is an opaque identifier
	// (e.g. signal key, event key, child workflow name) useful for logging.
	MarkWaiting(key, waitKind, resourceID string)

	// MarkActive signals that the run identified by key has exited a waiting state.
	// It is reference-counted against MarkWaiting calls with the same key.
	MarkActive(key string)
}

DurableEvictionHook observes waiting state transitions for a durable run so an eviction manager can decide when to evict a waiting run. Implementations must be safe for concurrent use. Kinds used by the SDK: "wait_for", "sleep", "wait_for_event", "spawn_child".

type DurableHatchetContext

type DurableHatchetContext interface {
	HatchetContext

	// SleepFor pauses execution for the specified duration and returns after that time has elapsed.
	// Duration is "global" meaning it will wait in real time regardless of transient failures
	// like worker restarts.
	SleepFor(duration time.Duration) (*SingleWaitResult, error)

	// WaitForEvent pauses execution until the specified user event is received.
	WaitForEvent(eventKey, expression string) (*SingleWaitResult, error)

	// WaitFor pauses execution until the specified conditions are met.
	// Conditions are "global" meaning they will wait in real time regardless of transient failures
	// like worker restarts.
	WaitFor(conditions condition.Condition) (*WaitResult, error)

	// Memo executes fn, JSON-serializes the result, and persists it via the engine's
	// durable event log. On replay, the cached payload is returned without re-executing
	// fn. Callers should json.Unmarshal the returned bytes into their concrete type.
	// If the engine does not support durable memoization, fn is executed and the result
	// is cached in process only (it will not survive replay).
	// The key must be unique within the task.
	Memo(key string, fn func() (any, error)) (json.RawMessage, error)

	// Now returns the current time, memoized via Memo so replays return the same value.
	Now() (time.Time, error)

	// InvocationCount returns the current invocation count for this durable task.
	// Increments each time the task is started (including after eviction/restore).
	InvocationCount() int32

	// SleepUntil sleeps until the specified absolute time. Combines Now() with SleepFor.
	SleepUntil(t time.Time) (*SingleWaitResult, error)
}

DurableHatchetContext extends HatchetContext with methods for durable tasks.

func NewDurableHatchetContext deprecated

func NewDurableHatchetContext(ctx HatchetContext) DurableHatchetContext

Deprecated: NewDurableHatchetContext is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type ErrMarshalKeyNotFound deprecated

type ErrMarshalKeyNotFound struct {
	Key string
}

Deprecated: ErrMarshalKeyNotFound is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (ErrMarshalKeyNotFound) Error deprecated

func (e ErrMarshalKeyNotFound) Error() string

Deprecated: Error is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type GetWorkflowConcurrencyGroupFn deprecated

type GetWorkflowConcurrencyGroupFn func(ctx HatchetContext) (string, error)

Deprecated: GetWorkflowConcurrencyGroupFn is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type HatchetContext

type HatchetContext interface {
	context.Context

	SetContext(ctx context.Context)

	GetContext() context.Context

	Worker() HatchetWorkerContext

	StepOutput(step string, target interface{}) error

	TriggerDataKeys() []string

	TriggerData(key string, target interface{}) error

	StepRunErrors() map[string]string

	TriggeredByEvent() bool

	WorkflowInput(target interface{}) error

	UserData(target interface{}) error

	AdditionalMetadata() map[string]string

	StepName() string

	StepRunId() string

	StepId() string

	WorkflowRunId() string

	WorkflowId() *string

	WorkflowVersionId() *string

	Log(message string)

	StreamEvent(message []byte)

	PutStream(message string)

	SpawnWorkflow(workflowName string, input any, opts *SpawnWorkflowOpts) (*client.Workflow, error)

	SpawnWorkflows(childWorkflows []*SpawnWorkflowsOpts) ([]*client.Workflow, error)

	ReleaseSlot() error

	RefreshTimeout(incrementTimeoutBy string) error

	RetryCount() int

	ParentOutput(parent create.NamedTask, output interface{}) error

	WasSkipped(parent create.NamedTask) bool

	TenantId() string

	WorkerId() string

	ActionId() string

	// DurableTaskInvocationCount returns the invocation count for durable task replay tracking.
	// Returns 0 if not set (non-durable tasks).
	DurableTaskInvocationCount() int32

	CurChildIndex() int
	IncChildIndex()

	Priority() int32

	FilterPayload() map[string]interface{}

	ParentWorkflowRunId() *string

	ChildIndex() *int32

	ChildKey() *string

	TriggeringEventId() *string

	TriggeringEventKey() *string
	// contains filtered or unexported methods
}

type HatchetWorkerContext

type HatchetWorkerContext interface {
	context.Context

	SetContext(ctx context.Context)

	GetContext() context.Context

	ID() string

	GetLabels() map[string]interface{}

	UpsertLabels(labels map[string]interface{}) error

	HasWorkflow(workflowName string) bool
}

type JobRunLookupData deprecated

type JobRunLookupData struct {
	Input       map[string]interface{} `json:"input"`
	TriggeredBy TriggeredBy            `json:"triggered_by"`
	Steps       map[string]StepData    `json:"steps,omitempty"`
}

Deprecated: JobRunLookupData is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type ManagedCompute deprecated

type ManagedCompute struct {
	ActionRegistry  *ActionRegistry
	Client          client.Client
	MaxRuns         int
	RuntimeConfigs  []rest.CreateManagedWorkerRuntimeConfigRequest
	CloudRegisterID *string
	Logger          *zerolog.Logger
}

Deprecated: ManagedCompute is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func NewManagedCompute deprecated

func NewManagedCompute(actionRegistry *ActionRegistry, client client.Client, maxRuns int) *ManagedCompute

Deprecated: NewManagedCompute is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*ManagedCompute) CloudRegister deprecated

func (mc *ManagedCompute) CloudRegister(ctx context.Context)

Deprecated: CloudRegister is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type MiddlewareFunc deprecated

type MiddlewareFunc func(ctx HatchetContext, next func(HatchetContext) error) error

Deprecated: MiddlewareFunc is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type NonRetryableError deprecated

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

Deprecated: NonRetryableError is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*NonRetryableError) Error deprecated

func (e *NonRetryableError) Error() string

Deprecated: Error is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type RateLimit deprecated

type RateLimit struct {
	// Key is the rate limit key
	Key     string  `yaml:"key,omitempty"`
	KeyExpr *string `yaml:"keyExpr,omitempty"`

	// Units is the amount of units this step consumes
	Units          *int    `yaml:"units,omitempty"`
	UnitsExpr      *string `yaml:"unitsExpr,omitempty"`
	LimitValueExpr *string `yaml:"limitValueExpr,omitempty"`

	// Duration is the duration of the rate limit
	Duration *types.RateLimitDuration `yaml:"duration,omitempty"`
}

Deprecated: RateLimit is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type RegisterActionOpt deprecated

type RegisterActionOpt func(*registerActionOpts)

Deprecated: RegisterActionOpt is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithActionName deprecated

func WithActionName(name string) RegisterActionOpt

Deprecated: WithActionName is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithCompute deprecated

func WithCompute(compute *compute.Compute) RegisterActionOpt

Deprecated: WithCompute is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type Service deprecated

type Service struct {
	Name string
	// contains filtered or unexported fields
}

Deprecated: Service is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Service) Call deprecated

func (s *Service) Call(verb string) *WorkflowStep

Deprecated: Call is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Service) On deprecated

func (s *Service) On(t triggerConverter, workflow workflowConverter) error

Deprecated: On is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Service) RegisterAction deprecated

func (s *Service) RegisterAction(fn any, opts ...RegisterActionOpt) error

Deprecated: RegisterAction is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Service) RegisterWorkflow deprecated

func (s *Service) RegisterWorkflow(workflow workflowConverter) error

Deprecated: RegisterWorkflow is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Service) Use deprecated

func (s *Service) Use(mws ...MiddlewareFunc)

Deprecated: Use is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type SingleWaitResult deprecated

type SingleWaitResult struct {
	*WaitResult
	// contains filtered or unexported fields
}

Deprecated: SingleWaitResult is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*SingleWaitResult) Unmarshal deprecated

func (w *SingleWaitResult) Unmarshal(in interface{}) error

Deprecated: Unmarshal is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type SpawnWorkflowOpts deprecated

type SpawnWorkflowOpts struct {
	Key                 *string
	Sticky              *bool
	AdditionalMetadata  *map[string]string
	Priority            *int32
	DesiredWorkerLabels map[string]*types.DesiredWorkerLabel
}

Deprecated: SpawnWorkflowOpts is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type SpawnWorkflowsOpts deprecated

type SpawnWorkflowsOpts struct {
	WorkflowName        string
	Input               any
	Key                 *string
	Sticky              *bool
	AdditionalMetadata  *map[string]string
	DesiredWorkerLabels map[string]*types.DesiredWorkerLabel
}

Deprecated: SpawnWorkflowsOpts is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type Step deprecated

type Step struct {
	Id string

	// non-ctx input is not optional
	NonCtxInput reflect.Type

	// non-err output is optional
	NonErrOutput *reflect.Type

	APIStep types.WorkflowStep
}

Deprecated: Step is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type StepData deprecated

type StepData map[string]interface{}

Deprecated: StepData is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type StepRunData deprecated

type StepRunData struct {
	Input              map[string]interface{}            `json:"input"`
	TriggeredBy        TriggeredBy                       `json:"triggered_by"`
	Parents            map[string]StepData               `json:"parents"`
	Triggers           map[string]map[string]interface{} `json:"triggers,omitempty"`
	AdditionalMetadata map[string]string                 `json:"additional_metadata"`
	UserData           map[string]interface{}            `json:"user_data"`
	StepRunErrors      map[string]string                 `json:"step_run_errors,omitempty"`
}

Deprecated: StepRunData is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type TriggeredBy deprecated

type TriggeredBy string

Deprecated: TriggeredBy is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

const (
	TriggeredByEvent    TriggeredBy = "event"
	TriggeredByCron     TriggeredBy = "cron"
	TriggeredBySchedule TriggeredBy = "schedule"
)

Deprecated: These constants are part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type WaitResult deprecated

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

Deprecated: WaitResult is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WaitResult) Keys deprecated

func (w *WaitResult) Keys() []string

Deprecated: Keys is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WaitResult) Unmarshal deprecated

func (w *WaitResult) Unmarshal(key string, in interface{}) error

Deprecated: Unmarshal is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type Worker deprecated

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

Deprecated: Worker is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func NewWorker deprecated

func NewWorker(fs ...WorkerOpt) (*Worker, error)

Deprecated: NewWorker is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Worker) Call deprecated

func (w *Worker) Call(action string) *WorkflowStep

Deprecated: Call is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Worker) CancelStepRun added in v0.83.58

func (w *Worker) CancelStepRun(stepRunId string)

CancelStepRun cancels a running step by its step run ID. Used by the eviction system to interrupt durable tasks that need to be evicted.

func (*Worker) ID deprecated

func (w *Worker) ID() *string

Deprecated: ID is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Worker) Logger deprecated

func (w *Worker) Logger() *zerolog.Logger

Deprecated: Logger is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Worker) NewService deprecated

func (w *Worker) NewService(name string) *Service

Deprecated: NewService is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Worker) On deprecated

func (w *Worker) On(t triggerConverter, workflow workflowConverter) error

Deprecated: On is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Worker) RegisterAction deprecated

func (w *Worker) RegisterAction(actionId string, method any) error

Deprecated: RegisterAction is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

An action should be of the format <service>:<verb>, for example slack:create-channel.

The method must match the following signatures: - func(ctx context.Context) error - func(ctx context.Context, input *Input) error - func(ctx context.Context, input *Input) (*Output, error) - func(ctx context.Context) (*Output, error)

func (*Worker) RegisterWorkflow deprecated

func (w *Worker) RegisterWorkflow(workflow workflowConverter) error

Deprecated: RegisterWorkflow is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Worker) RegisterWorkflowV1 deprecated

func (w *Worker) RegisterWorkflowV1(workflow *contracts.CreateWorkflowVersionRequest) error

Deprecated: RegisterWorkflowV1 is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Worker) Run deprecated

func (w *Worker) Run(ctx context.Context) error

Deprecated: Run is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Worker) SetPanicHandler deprecated added in v0.73.0

func (w *Worker) SetPanicHandler(panicHandler func(ctx HatchetContext, recovered any))

Deprecated: SetPanicHandler is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Worker) Start deprecated

func (w *Worker) Start() (func() error, error)

Deprecated: Start is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*Worker) Use deprecated

func (w *Worker) Use(mws ...MiddlewareFunc)

Deprecated: Use is an internal method used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type WorkerOpt deprecated

type WorkerOpt func(*WorkerOpts)

Deprecated: WorkerOpt is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithClient deprecated

func WithClient(client client.Client) WorkerOpt

Deprecated: WithClient is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithDurableSlots deprecated added in v0.78.27

func WithDurableSlots(durableSlots int) WorkerOpt

Deprecated: WithSlots is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithErrorAlerter deprecated

func WithErrorAlerter(alerter errors.Alerter) WorkerOpt

Deprecated: WithErrorAlerter is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithIntegration deprecated

func WithIntegration(integration integrations.Integration) WorkerOpt

Deprecated: WithIntegration is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithInternalData deprecated

func WithInternalData(actions []string) WorkerOpt

Deprecated: WithInternalData is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithLabels deprecated

func WithLabels(labels map[string]interface{}) WorkerOpt

Deprecated: WithLabels is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithLegacySlots added in v0.78.27

func WithLegacySlots(slots int32) WorkerOpt

WithLegacySlots configures the worker to register using the deprecated `slots` proto field instead of `slot_config`. This is for backward compatibility with engines that do not support multiple slot types.

func WithLogLevel deprecated

func WithLogLevel(lvl string) WorkerOpt

Deprecated: WithLogLevel is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithLogger deprecated

func WithLogger(l *zerolog.Logger) WorkerOpt

Deprecated: WithLogger is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithMaxRuns deprecated

func WithMaxRuns(maxRuns int) WorkerOpt

Deprecated: WithMaxRuns is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithName deprecated

func WithName(name string) WorkerOpt

Deprecated: WithName is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithSlotConfig deprecated added in v0.78.27

func WithSlotConfig(slotConfig map[string]int32) WorkerOpt

Deprecated: WithSlots is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func WithSlots deprecated added in v0.78.13

func WithSlots(slots int) WorkerOpt

Deprecated: WithSlots is an internal function used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type WorkerOpts deprecated

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

Deprecated: WorkerOpts is an internal type used by the new Go SDK. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type Workflow deprecated

type Workflow struct {
	Jobs []WorkflowJob
}

Deprecated: Workflow is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type WorkflowConcurrency deprecated

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

Deprecated: WorkflowConcurrency is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func Concurrency deprecated

Deprecated: Concurrency is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func Expression deprecated

func Expression(expr string) *WorkflowConcurrency

Deprecated: Expression is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowConcurrency) LimitStrategy deprecated

Deprecated: LimitStrategy is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowConcurrency) MaxRuns deprecated

func (c *WorkflowConcurrency) MaxRuns(maxRuns int32) *WorkflowConcurrency

Deprecated: MaxRuns is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type WorkflowJob deprecated

type WorkflowJob struct {
	// The name of the job
	Name string

	Description string

	On triggerConverter

	Concurrency *WorkflowConcurrency

	// The steps that are run in the job
	Steps []*WorkflowStep

	OnFailure *WorkflowJob

	ScheduleTimeout string

	StickyStrategy *types.StickyStrategy
}

Deprecated: WorkflowJob is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowJob) ToActionMap deprecated

func (j *WorkflowJob) ToActionMap(svcName string) ActionMap

Deprecated: ToActionMap is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowJob) ToWorkflow deprecated

func (j *WorkflowJob) ToWorkflow(svcName string, namespace string) types.Workflow

Deprecated: ToWorkflow is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowJob) ToWorkflowJob deprecated

func (j *WorkflowJob) ToWorkflowJob(svcName string, namespace string) (*types.WorkflowJob, error)

Deprecated: ToWorkflowJob is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowJob) ToWorkflowTrigger deprecated

func (j *WorkflowJob) ToWorkflowTrigger() triggerConverter

Deprecated: ToWorkflowTrigger is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

type WorkflowStep deprecated

type WorkflowStep struct {
	// The step timeout
	Timeout string

	// The executed function
	Function any

	// The step id/name. If not set, one will be generated from the function name
	Name string

	// The ids of the parents
	Parents []string

	Retries int

	RetryBackoffFactor *float32

	RetryMaxBackoffSeconds *int32

	RateLimit []RateLimit

	DesiredLabels map[string]*types.DesiredWorkerLabel

	Compute *compute.Compute
}

Deprecated: WorkflowStep is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func Fn deprecated

func Fn(f any) *WorkflowStep

Deprecated: Fn is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) AddParents deprecated

func (w *WorkflowStep) AddParents(parents ...string) *WorkflowStep

Deprecated: AddParents is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) GetActionId deprecated

func (w *WorkflowStep) GetActionId(svcName string, index int) string

Deprecated: GetActionId is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) GetStepId deprecated

func (w *WorkflowStep) GetStepId(index int) string

Deprecated: GetStepId is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) SetCompute deprecated

func (w *WorkflowStep) SetCompute(compute *compute.Compute) *WorkflowStep

Deprecated: SetCompute is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) SetDesiredLabels deprecated

func (w *WorkflowStep) SetDesiredLabels(labels map[string]*types.DesiredWorkerLabel) *WorkflowStep

Deprecated: SetDesiredLabels is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) SetName deprecated

func (w *WorkflowStep) SetName(name string) *WorkflowStep

Deprecated: SetName is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) SetRateLimit deprecated

func (w *WorkflowStep) SetRateLimit(rateLimit RateLimit) *WorkflowStep

Deprecated: SetRateLimit is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) SetRetries deprecated

func (w *WorkflowStep) SetRetries(retries int) *WorkflowStep

Deprecated: SetRetries is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) SetRetryBackoffFactor deprecated

func (w *WorkflowStep) SetRetryBackoffFactor(retryBackoffFactor float32) *WorkflowStep

Deprecated: SetRetryBackoffFactor is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) SetRetryMaxBackoffSeconds deprecated

func (w *WorkflowStep) SetRetryMaxBackoffSeconds(retryMaxBackoffSeconds int32) *WorkflowStep

Deprecated: SetRetryMaxBackoffSeconds is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) SetTimeout deprecated

func (w *WorkflowStep) SetTimeout(timeout string) *WorkflowStep

Deprecated: SetTimeout is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) ToActionMap deprecated

func (w *WorkflowStep) ToActionMap(svcName string) ActionMap

Deprecated: ToActionMap is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) ToWorkflow deprecated

func (w *WorkflowStep) ToWorkflow(svcName string, namespace string) types.Workflow

Deprecated: ToWorkflow is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) ToWorkflowStep deprecated

func (w *WorkflowStep) ToWorkflowStep(svcName string, index int, namespace string) (*Step, error)

Deprecated: ToWorkflowStep is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

func (*WorkflowStep) ToWorkflowTrigger deprecated

func (w *WorkflowStep) ToWorkflowTrigger() triggerConverter

Deprecated: ToWorkflowTrigger is part of the legacy v0 workflow definition system. Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead. Migration guide: https://docs.hatchet.run/home/migration-guide-go

Directories

Path Synopsis
Deprecated: This package is part of the legacy v0 workflow definition system.
Deprecated: This package is part of the legacy v0 workflow definition system.

Jump to

Keyboard shortcuts

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