Documentation ¶
Overview ¶
Package forward describes the JSON-based protocol used to 'forward' messages and errors from a machine node to its invoker, potentially over SSH.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRemote = errors.New("remote error")
Functions ¶
This section is empty.
Types ¶
type Forward ¶
type Forward struct { // Error carries an error's Error string. Error string `json:"error,omitempty"` // Build carries information about a corpus build. Build *builder.Message `json:"build,omitempty"` // Action carries information about a machine-node action. Action *observer.Message `json:"action,omitempty"` }
Forward describes a 'forwarded' message or error.
type Observer ¶
Observer wraps a JSON encoder, lifting it to an Observer that sends JSON-encoded Forwards.
func NewObserver ¶
NewObserver creates a forwarding observer over w.
func (*Observer) OnMachineNodeAction ¶
OnMachineNodeAction sends an action message through this Observer's encoder.
type Replayer ¶
type Replayer struct { // Decoder is the decoder on which we are listening for messages to replay. Decoder *json.Decoder // Observers is the set of observers to which we are forwarding observations. Observers []observer.Observer }
Replayer coordinates reading forwarded builder-status messages from a JSON decoder and replaying them to an observer.
Click to show internal directories.
Click to hide internal directories.