Versions in this module Expand all Collapse all v0 v0.9.0 Mar 25, 2020 Changes in this version + var CaptainMachine = "captain" + var DefaultLimits = &Limits + var Interpreters = core.InterpretersMap + var TimersMachine = "timers" + func DefaultState(s *core.State) *core.State + func JS(x interface{}) string + func JSON(x interface{}) string + func JShort(x interface{}) string + func ResolveSpecSource(ctx context.Context, specSource interface{}) (*crew.SpecSource, *core.Spec, error) + func ShellExpand(msg string) (string, error) + type Changed struct + Deleted bool + PreviousState []byte + SpecSrc *crew.SpecSource + State *core.State + type Couplings interface + IO func(context.Context) (chan interface{}, chan *Result, error) + Read func(context.Context) (map[string]*crew.Machine, error) + Start func(context.Context) error + Stop func(context.Context) error + type Crew struct + Conf *CrewConf + Machines map[string]*crew.Machine + Verbose bool + func NewCrew(ctx context.Context, conf *CrewConf, couplings Couplings) (*Crew, error) + func (c *Crew) DeleteMachine(ctx context.Context, mid string) error + func (c *Crew) DoOp(ctx context.Context, op *CrewOp) error + func (c *Crew) Errorf(format string, args ...interface{}) + func (c *Crew) GetChanged(ctx context.Context) (map[string]*Changed, error) + func (c *Crew) GetTimers(ctx context.Context) (*Timers, error) + func (c *Crew) Logf(format string, args ...interface{}) + func (c *Crew) Loop(ctx context.Context) error + func (c *Crew) NewCaptainSpec() *core.Spec + func (c *Crew) NewTimersSpec() *core.Spec + func (c *Crew) ProcessMsg(ctx context.Context, msg interface{}) (*Result, error) + func (c *Crew) RunMachine(ctx context.Context, msg interface{}, m *crew.Machine) (*core.Walked, error) + func (c *Crew) RunMachines(ctx context.Context, msg interface{}) (map[string]*core.Walked, error) + func (c *Crew) SetMachine(ctx context.Context, mid string, src *crew.SpecSource, state *core.State) error + type CrewConf struct + Ctl *core.Control + Id string + type CrewOp struct + Delete []string + Update map[string]*crew.Machine + func AsCrewOp(msg interface{}) (*CrewOp, error) + type JSONStore struct + StateInputFilename string + StateOutputFilename string + WG sync.WaitGroup + func NewJSONStore() *JSONStore + func (s *JSONStore) Read(ctx context.Context) (map[string]*crew.Machine, error) + func (s *JSONStore) Start(ctx context.Context) error + func (s *JSONStore) Stop(ctx context.Context, wait bool) error + func (s *JSONStore) WriteState(ctx context.Context) error + type Limits struct + MaxSheens int + MaxStatePerSheen int + type Result struct + Changed map[string]*Changed + Emitted [][]interface{} + type Stdio struct + EchoInput bool + In io.Reader + InputEOF chan bool + Out io.Writer + PadTags bool + ShellExpand bool + Timestamps bool + WriteStatePerMsg bool + func NewStdio(shellExpand bool) *Stdio + func (s *Stdio) IO(ctx context.Context) (chan interface{}, chan *Result, error) + func (s *Stdio) Read(ctx context.Context) (map[string]*crew.Machine, error) + func (s *Stdio) Start(ctx context.Context) error + func (s *Stdio) Stop(ctx context.Context) error + type TimerEntry struct + At time.Time + Ctl chan bool + Id string + Msg interface{} + type TimerMsg struct + Add struct{ ... } + Cancel struct{ ... } + type Timers struct + Emitter func(context.Context, *TimerEntry) + Map map[string]*TimerEntry + func NewTimers(emitter func(context.Context, *TimerEntry)) *Timers + func (ts *Timers) Add(ctx context.Context, id string, msg interface{}, d time.Duration) error + func (ts *Timers) Cancel(ctx context.Context, id string) error + func (ts *Timers) Start(ctx context.Context) error + func (ts *Timers) State() *core.State Incompatible versions in this module v2.0.0+incompatible Apr 15, 2019