Documentation
¶
Overview ¶
Package control holds the controls sent to a running loop: stop, inject a message, change settings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Control ¶
type Control struct {
Kind Kind
Message string // for Inject
Change state.Change // for ModifyConfig
}
Control is one queued control.
type Inbox ¶
type Inbox struct {
// contains filtered or unexported fields
}
Inbox queues controls until the loop is ready for them. Stop has its own channel so it can never be lost to a full queue.
func (*Inbox) Drain ¶
Drain applies every queued control and tells n about each. It returns true when one of them was a stop.
func (*Inbox) Stop ¶
func (in *Inbox) Stop()
Stop asks the loop to stop. Safe to call more than once.
func (*Inbox) StopRequested ¶
Click to show internal directories.
Click to hide internal directories.