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 ¶
Types ¶
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)
// OrcaExec builds the runner for an Orca binary named by --config
// (delivery.orca_bin, or "orca" for PATH). Nil means the real one.
OrcaExec func(bin string) orcaterm.Runner
// HostReads builds the reads for --config: the host key's own client,
// never the factory's ambient one. Nil means the real one.
HostReads func(f *cmdutil.Factory, cfg *hostpoller.Config, key string) (Reads, error)
}
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.
Click to show internal directories.
Click to hide internal directories.