orca

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package orca is the `hadron orca` group: integrations that read the Orca terminal app (cli#1187). Everything under it needs the Orca CLI/app on THIS host and says so; the output contracts it emits (terminal-status@1) carry nothing Orca-specific, so another terminal environment could ship its own command with the same contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdOrca

func NewCmdOrca(f *cmdutil.Factory) *cobra.Command

NewCmdOrca builds `hadron orca`.

Types

type Bound

type Bound struct {
	WorkerID   string
	WorkerName string
	AppID      string
}

Bound is the worker a worktree's session binding names.

type Env

type Env struct {
	Orca    orcaterm.Runner
	Now     func() time.Time
	Reads   func(ctx context.Context, app string) (Reads, error)
	BoundAt func(ctx context.Context, worktree string) (Bound, bool)
}

Env is everything the command touches outside itself: tests inject fakes.

type Reads

type Reads interface {
	// Workers is the App's active (not retired) workers.
	Workers(ctx context.Context) ([]Worker, error)
	// Subscriptions is each worker's actively subscribed, enabled tickers,
	// by worker id.
	Subscriptions(ctx context.Context) (map[string][]terminalstatus.Ticker, error)
	// DueTicks is the oldest unanswered tick of every ticker the named
	// workers are owed, by worker id. A refusal is an error: the caller
	// fails closed on it.
	DueTicks(ctx context.Context, workerIDs []string) (map[string][]terminalstatus.DueTick, error)
}

Reads is every server read the command makes. All of them are reads: the command never acknowledges a wake and writes nothing.

type Worker

type Worker struct {
	ID   string
	Name string
}

Worker is one casting of the App, as the command needs it.

Jump to

Keyboard shortcuts

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