Documentation ¶
Overview ¶
Package observer contains interfaces and types for machine node observers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LowerToBuilder ¶
LowerToBuilder lowers each observer in obs to a corpus builder observer.
func OnCompileStart ¶
OnCompileStart sends a compile start message to every observer in obs, containing the quantity set qs.
func OnMachineNodeAction ¶
OnMachineNodeAction distributes m to every observer in obs.
func OnRunStart ¶
OnRunStart sends a run start message to every observer in obs, containing the quantity set qs.
Types ¶
type Message ¶
type Message struct { // Kind is the kind of message. Kind MessageKind // Quantities contains, depending on Kind, various pieces of quantity information about the machine node. Quantities quantity.MachNodeSet }
Message is the type of messages from a machine node observer.
type MessageKind ¶
type MessageKind uint8
MessageKind is the enumeration of possible messages from a machine node observer.
const ( // KindCompileStart means that the machine node is starting its compile phase. // Quantities.Compile contains the compiler quantities. KindCompileStart MessageKind = iota // KindRunStart means that the machine node is starting its run phase. // Quantities.Run contains the runner quantities. KindRunStart )
type Observer ¶
type Observer interface { // Observer allows observing the corpus builds for both compilation and running. builder.Observer // OnMachineNodeAction observes a machine node action, usually forwarded from a remote node. OnMachineNodeAction(Message) }
Observer is the interface of anything that observes machine node behaviour.
Click to show internal directories.
Click to hide internal directories.