Documentation
¶
Overview ¶
Package runcmd is `steerloop run`. Start at run.go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is `steerloop run`. It implements cli.Command.
func New ¶
func New(env cli.Environment) *Command
type EventSink ¶
EventSink receives every event the loop emits. → cmd/steerloop/internal/render (people), steerloop/internal/eventlog (machines)
type InputReader ¶ added in v0.2.7
InputReader reads stdin into the lines steering applies. → cmd/steerloop/internal/stdin
type Options ¶
type Options struct {
bootstrap.Options
// Output Options
Output string
// Steering/Loop Control Options
ControlPath string // give the loop a stream of commands that arrive over time, same as if a person typed it at the terminal
}
Options is the `steerloop run` command line: the flags shared with chat, and the ones only a single run has.
func ParseOptions ¶
ParseOptions reads flags into Options and reports its own errors to stderr.
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
Run is one fully wired run, ready to execute. NewRun builds it.
func NewRun ¶
NewRun builds a Run from options. It is the only place that picks a concrete type for each interface run.go declares, so this function alone tells you which implementation runs.
func (*Run) Execute ¶
Execute runs one turn. Exactly four goroutines take part, all started here:
- the loop itself — loop.Start; it closes events when it is done
- stdin lines — r.input.Read; blocks on stdin, so it can outlive the run (the process exits right after, so that is harmless)
- steering input — r.steering.Steer
- Ctrl-C handling — r.interrupts.Watch
cancel (deferred) ends 3 and 4 once the loop has finished.