controller

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package controller owns durable workflow admission independently of clients.

Index

Constants

This section is empty.

Variables

Functions

func ResolveSecrets

func ResolveSecrets(refs map[string]string) (map[string]string, error)

Types

type Client

type Client struct {
	HTTP *http.Client
	Dir  string
}

func NewClient

func NewClient(dir string) *Client

func (*Client) Call

func (c *Client) Call(ctx context.Context, method, path string, input, output any) error

type Lock

type Lock = ownership.Lock

type Readiness

type Readiness struct {
	Ready       bool                              `json:"ready"`
	Checks      map[string]string                 `json:"checks"`
	Filesystems map[string]operational.Filesystem `json:"filesystems"`
}

type SendRequest

type SendRequest struct {
	RequestID string `json:"request_id"`
	Prompt    string `json:"prompt"`
}

type Server

type Server struct {
	Operational operational.Config
	Logger      *slog.Logger

	MaxQueued  int
	Workers    *workflows.WorkerManager
	Executor   *workflows.Executor
	Store      *workflows.SQLiteStore
	Dir        string
	MaxRuns    int
	RunTimeout time.Duration
	// contains filtered or unexported fields
}

func (*Server) Serve

func (s *Server) Serve(ctx context.Context) error

type StartRequest

type StartRequest struct {
	TaskGroup  string            `json:"task_group,omitempty"`
	RequestID  string            `json:"request_id,omitempty"`
	Ref        string            `json:"ref"`
	Inputs     map[string]any    `json:"inputs,omitempty"`
	SecretRefs map[string]string `json:"secret_refs,omitempty"`
}

Jump to

Keyboard shortcuts

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