server

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer struct {
	Engine *workflow.Engine
	Store  workflow.StateStore
	Hub    *EventHub
	Logger *slog.Logger
	// contains filtered or unexported fields
}

func NewAPIServer

func NewAPIServer(engine *workflow.Engine, store workflow.StateStore) *APIServer

func (*APIServer) Handler

func (s *APIServer) Handler() http.Handler

type EventHub

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

func NewEventHub

func NewEventHub(buffer int) *EventHub

func (*EventHub) CloseRun

func (h *EventHub) CloseRun(runID string)

func (*EventHub) Emit

func (h *EventHub) Emit(ctx context.Context, e workflow.Event)

func (*EventHub) Subscribe

func (h *EventHub) Subscribe(runID string) (<-chan workflow.Event, func())

type RunOptionsInput

type RunOptionsInput struct {
	RunID       string   `json:"run_id,omitempty"`
	Start       []string `json:"start,omitempty"`
	Concurrency int      `json:"concurrency,omitempty"`
	FailFast    *bool    `json:"fail_fast,omitempty"`
	AllowCycles bool     `json:"allow_cycles,omitempty"`
}

type RunRequest

type RunRequest struct {
	Definition json.RawMessage  `json:"definition"`
	Options    *RunOptionsInput `json:"options,omitempty"`
}

type RunResponse

type RunResponse struct {
	WorkflowID string `json:"workflow_id,omitempty"`
	RunID      string `json:"run_id,omitempty"`
	Status     string `json:"status,omitempty"`
}

Jump to

Keyboard shortcuts

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