Versions in this module Expand all Collapse all v0 v0.1.1 Nov 10, 2026 v0.1.0 Nov 10, 2026 Changes in this version + var DefaultRunRetention = RunRetention + var ErrRunAllStalled = errors.New("memory: RunAll stalled") + type Client struct + func New(opts ...Option) *Client + func (c *Client) Cancel(_ context.Context, ref workflow.RunRef) error + func (c *Client) CancelAll(ctx context.Context, q workflow.RunQuery) (int, error) + func (c *Client) CancelStep(ctx context.Context, ref workflow.RunRef, step string) error + func (c *Client) Capabilities() workflow.Caps + func (c *Client) Delete(ctx context.Context, ref workflow.RunRef) error + func (c *Client) Done() <-chan struct{} + func (c *Client) Drain(ctx context.Context) error + func (c *Client) DrainWithReport(ctx context.Context) (workflow.DrainReport, error) + func (c *Client) Enqueue(ctx context.Context, job workflow.Job) (workflow.RunRef, error) + func (c *Client) EnqueueClosure(ctx context.Context, cl workflow.ClosureJob) (workflow.RunRef, error) + func (c *Client) ForceComplete(ctx context.Context, ref workflow.RunRef) error + func (c *Client) ForceFail(ctx context.Context, ref workflow.RunRef, reason string) error + func (c *Client) Health(context.Context) workflow.HealthReport + func (c *Client) Nodes(ctx context.Context) ([]workflow.NodeInfo, error) + func (c *Client) OnLifecycle(fn workflow.LifecycleFunc) error + func (c *Client) OnRunFinished(fn workflow.RunFinishedFunc) error + func (c *Client) OnTick(fn workflow.TickObserver) error + func (c *Client) Pause(ctx context.Context, t workflow.PauseTarget) error + func (c *Client) PauseSchedule(_ context.Context, t workflow.ScheduleTarget) error + func (c *Client) Paused(ctx context.Context) ([]workflow.PauseTarget, error) + func (c *Client) PayloadLimit() int + func (c *Client) QueueLoads(ctx context.Context) ([]workflow.QueueLoad, error) + func (c *Client) Register(wf workflow.Workflow) error + func (c *Client) Reschedule(ctx context.Context, ref workflow.RunRef, at time.Time) (workflow.RunRef, error) + func (c *Client) Result(ctx context.Context, ref workflow.RunRef) ([]byte, error) + func (c *Client) Resume(ctx context.Context, t workflow.PauseTarget) error + func (c *Client) ResumeSchedule(_ context.Context, t workflow.ScheduleTarget) error + func (c *Client) Retry(ctx context.Context, ref workflow.RunRef) (workflow.RunRef, error) + func (c *Client) RunAll(ctx context.Context) (RunAllReport, error) + func (c *Client) Runs(ctx context.Context, q workflow.RunQuery) (workflow.RunPage, error) + func (c *Client) Schedule(ctx context.Context, s workflow.Schedule) (workflow.ScheduleID, error) + func (c *Client) Schedules(ctx context.Context) ([]workflow.ScheduleInfo, error) + func (c *Client) SetWorkers(ctx context.Context, queue string, n int) error + func (c *Client) Signal(ctx context.Context, ev workflow.Event) error + func (c *Client) Start(ctx context.Context) error + func (c *Client) Status(_ context.Context, ref workflow.RunRef) (workflow.Status, error) + func (c *Client) Stop() + func (c *Client) StopCause() error + func (c *Client) TriggerSchedule(ctx context.Context, id workflow.ScheduleID) (workflow.RunRef, error) + func (c *Client) Unschedule(_ context.Context, id workflow.ScheduleID) error + type Option func(*Client) + func WithClock(c clock.Clock) Option + func WithCronParser(p cron.Parser) Option + func WithErrorHistory(n int) Option + func WithJitterSource(rnd func() float64) Option + func WithLogger(l *slog.Logger) Option + func WithMiddleware(mw ...workflow.Middleware) Option + func WithNodeID(id string) Option + func WithPayloadLimit(n int) Option + func WithQueues(qs ...workflow.QueueConfig) Option + func WithRecycle(r workflow.Recycle) Option + func WithRunRetention(r RunRetention) Option + func WithStopWhenIdle(grace time.Duration) Option + func WithWorkers(n int) Option + type RunAllReport struct + Cancelled int + Discarded int + Failed int + Succeeded int + Waiting int + type RunRetention struct + MaxAge time.Duration + MaxRuns int