headgateworkflow

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package headgateworkflow implements durable DAG dependencies as an opt-in layer over headgate's ordinary pending jobs. It adds no driver dependency to core.

Index

Constants

View Source
const (
	CoordinatorKind = "headgate:workflow"
)

Variables

This section is empty.

Functions

func RegisterCoordinator

func RegisterCoordinator(registry *headgate.Registry, inspect headgate.InspectStore, poll time.Duration) error

RegisterCoordinator installs the durable dependency resolver. Each tick performs one bounded point read per node; it never scans queue depth.

Types

type CoordinatorArgs

type CoordinatorArgs struct {
	WorkflowID string     `json:"workflow_id"`
	Nodes      []nodeSpec `json:"nodes"`
}

func (CoordinatorArgs) Kind

func (CoordinatorArgs) Kind() string

type Workflow

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

Workflow is a validated DAG builder. Prepare returns one atomic enqueue batch: the durable coordinator followed by every child in pending state.

func New

func New(id string) *Workflow

func (*Workflow) Add

func (w *Workflow) Add(name string, env headgate.Envelope, deps ...string) *Workflow

func (*Workflow) CoordinatorQueue

func (w *Workflow) CoordinatorQueue(queue string) *Workflow

func (*Workflow) Prepare

func (w *Workflow) Prepare() ([]headgate.Envelope, error)

func (*Workflow) Retention

func (w *Workflow) Retention(d time.Duration) error

Jump to

Keyboard shortcuts

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