temporal

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEngineRequired = errors.New("temporal driver requires an engine")
View Source
var ErrNotImplemented = ErrEngineRequired

ErrNotImplemented is kept for backward compatibility.

Functions

This section is empty.

Types

type Adapter

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

func New

func New(cfg Config) (*Adapter, error)

func (*Adapter) Batch

func (a *Adapter) Batch(jobs ...bus.Job) bus.BatchBuilder

func (*Adapter) Chain

func (a *Adapter) Chain(jobs ...bus.Job) bus.ChainBuilder

func (*Adapter) Dispatch

func (a *Adapter) Dispatch(ctx context.Context, job bus.Job) (bus.DispatchResult, error)

func (*Adapter) DispatchCtx

func (a *Adapter) DispatchCtx(ctx context.Context, job bus.Job) (bus.DispatchResult, error)

func (*Adapter) FindBatch

func (a *Adapter) FindBatch(_ context.Context, batchID string) (bus.BatchState, error)

func (*Adapter) FindChain

func (a *Adapter) FindChain(_ context.Context, chainID string) (bus.ChainState, error)

func (*Adapter) Prune

func (a *Adapter) Prune(context.Context, time.Time) error

func (*Adapter) Register

func (a *Adapter) Register(jobType string, handler bus.Handler)

func (*Adapter) Shutdown

func (a *Adapter) Shutdown(context.Context) error

func (*Adapter) StartWorkers

func (a *Adapter) StartWorkers(context.Context) error

type Config

type Config struct {
	Namespace string
	JobQueue  string
	Engine    Engine
}

type Engine

type Engine interface {
	StartWorkflow(ctx context.Context, req StartWorkflowRequest) (StartWorkflowResult, error)
}

type StartWorkflowRequest

type StartWorkflowRequest struct {
	DispatchID string
	JobID      string
	Namespace  string
	JobQueue   string
	JobType    string
	Payload    []byte
	Options    bus.JobOptions
}

type StartWorkflowResult

type StartWorkflowResult struct {
	WorkflowID string
	RunID      string
}

Jump to

Keyboard shortcuts

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