runinventory

package
v0.149.5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package runinventory is a bounded first consumer of the wing control API. It starts without known IDs and has no store, runtime or transport authority.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call func(context.Context, string, json.RawMessage) (map[string]any, error)

type Counts

type Counts struct {
	Total             int `json:"total"`
	Completed         int `json:"completed"`
	Running           int `json:"running"`
	Interrupted       int `json:"interrupted"`
	UnavailableOutput int `json:"unavailable_output"`
	TerminalOther     int `json:"terminal_other"`
	UnavailableRun    int `json:"unavailable_run"`
	UnknownCleanup    int `json:"unknown_cleanup"`
}

type Options

type Options struct {
	Limit                 int    `json:"limit,omitempty"`
	MaxPages              int    `json:"-"`
	RequestKey            string `json:"idempotency_key,omitempty"`
	TerminalWindowSeconds int    `json:"terminal_window_seconds,omitempty"`
}

type RecoveredRun

type RecoveredRun struct {
	WingID    string `json:"wing_id"`
	ID        string `json:"run_id"`
	SessionID string `json:"session_id"`
	State     string `json:"state"`
	Status    string `json:"status"`
	Cleanup   string `json:"cleanup"`
	Output    string `json:"output,omitempty"`
	ReadError string `json:"read_error,omitempty"`
}

type Recovery

type Recovery struct {
	Runs             []RecoveredRun `json:"runs"`
	Counts           Counts         `json:"counts"`
	Pages            int            `json:"pages"`
	Complete         bool           `json:"complete"`
	SnapshotRevision string         `json:"snapshot_revision"`
}

func Recover

func Recover(ctx context.Context, call Call, opts Options) (Recovery, error)

Recover finishes discovery before interpreting absence. It reads status for each discovered ID and reads a terminal result once. It never launches, steers, stops, waits, polls or reconstructs archived output.

Jump to

Keyboard shortcuts

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