Versions in this module Expand all Collapse all v0 v0.3.0 Nov 17, 2026 v0.2.0 Nov 2, 2026 v0.1.1 Oct 16, 2026 v0.1.0 Oct 16, 2026 Changes in this version + const RuntimeNamespace + var ErrRuntimeLeased = errors.New("runtime still has a live supervisor lease") + type Artifact struct + Checksum string + ID string + Revision string + type Connection struct + ID string + Metadata map[string]string + SourceEndpoint string + TargetEndpoint string + type Endpoint struct + Address string + Direction string + ID string + Transport string + type Instance struct + Artifact Artifact + Connections []Connection + CrashCount int + Dependencies []string + Endpoints []Endpoint + ExitCode *int + Health string + ID string + LastError string + PID int + ProcessIdentity string + StartedAt time.Time + State State + UpdatedAt time.Time + type Options struct + Graph graph.Store + LeaseDuration time.Duration + LogLimit int + OrphanPolicy OrphanPolicy + ProcessPolicyFactory func(Spec) (ProcessPolicy, error) + RequireChecksum bool + RetainTerminal int + RuntimeID string + SecretResolver func(context.Context, SecretReference) (string, error) + type Orphan struct + Alive bool + ID string + PID int + ProcessIdentity string + type OrphanPolicy string + const OrphanMark + const OrphanTerminate + type ProcessPolicy interface + Attach func(*os.Process) error + Close func() error + Configure func(*exec.Cmd) error + type RestartPolicy struct + InitialDelay time.Duration + MaxAttempts int + MaxDelay time.Duration + type SecretReference struct + ID string + Scope string + type Spec struct + Args []string + Artifact Artifact + Command string + Connections []Connection + Dependencies []string + Dir string + EndpointReady func(context.Context, Instance) error + Endpoints []Endpoint + Environment map[string]string + HealthCheck func(context.Context) error + ProtocolHandshake func(context.Context, Instance) error + ReadinessTimeout time.Duration + Restart RestartPolicy + SecretReferences map[string]SecretReference + type State string + const StateCrashed + const StateOrphaned + const StateReady + const StateRestarting + const StateRunning + const StateStarting + const StateStopped + const StateStopping + type Supervisor struct + func New(opts Options) (*Supervisor, error) + func (s *Supervisor) Close(ctx context.Context) error + func (s *Supervisor) Health(ctx context.Context, id string) (bool, error) + func (s *Supervisor) Instance(id string) (Instance, error) + func (s *Supervisor) Instances() []Instance + func (s *Supervisor) Logs(id string) (string, error) + func (s *Supervisor) Orphans() []Orphan + func (s *Supervisor) ResolveOrphan(ctx context.Context, id string) error + func (s *Supervisor) Start(ctx context.Context, spec Spec) (Instance, error) + func (s *Supervisor) Stop(ctx context.Context, id string) error