Documentation ¶
Index ¶
Constants ¶
const ( ErrReturnedLate = "processor returned late before context closed" ErrAlreadyStopped = "stream already stopped" )
Error messages
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdviceHandler ¶
AdviceHandler is provided to Stream.StartWith so that the programmer may react to Advice messages being received by the Stream's monitor channel. Calling next() will ultimately invoke the default behavior for the received Advice. Not calling next() will short-circuit that behavior
type Processor ¶
Processor is a function that processes part of a Stream topology. Recoverable and fatal errors can be sent to the context.Context's Monitor channel.
type Sink ¶
type Sink struct{}
Sink messages are produced by a Processor that is meant to terminate a Stream. Examples would be node.SinkTo and node.Sink
type Source ¶
type Source struct{}
Source messages are provided to a Processor that is meant to generate messages from a source outside its current Stream. Examples would be node.TopicConsumer and node.Generate
type Stream ¶
type Stream interface { // Start begins background processing of the Stream Start() Running // StartWith begins background processing of the Stream, but gives the // programmer first crack at the Advice being received on the Stream's // monitor channel StartWith(AdviceHandler) Running }
Stream is a process that performs the work assigned to it using the set of Processors provided to it when constructed