Documentation
¶
Overview ¶
Package communication contains necessary logic for passing messages, returning errors and stop signals. The Engine will issue a ReadJob with a context and sends it to the readers. The NewReadJob function injects a unique ID into the context and returns it. All readers/recorders should use this JobID for returning errors and logging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorMessage ¶
type ErrorMessage struct { // The ID comes from the issued job. ID JobID // Name is the name of the instance, which is returned by its Name() method Name string Err error }
An ErrorMessage is sent when an error occurs.
func (*ErrorMessage) Error ¶
func (e *ErrorMessage) Error() string
type JobID ¶
JobID is a unique ID. Only the Engine issues this ID and you should pass it along as you receive.
type ReadJob ¶
type ReadJob struct {
// contains filtered or unexported fields
}
ReadJob is a package we send to readers to do their work.
type StopChannel ¶ added in v0.4.0
type StopChannel chan chan struct{}
StopChannel is used to signal each component when to stop. They should return a signal back when they have finished their work.