Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnknownVM = errors.New("unknown VM") ErrInvalidTopicName = errors.New("invalid topic name") ErrWrongTopicEventType = errors.New("wrong topic event type") ErrWrongTopicNetworkID = errors.New("wrong topic networkID") )
var ( // ErrUnknownProcessorType is returned when encountering a client type with no // known implementation ErrUnknownProcessorType = errors.New("unknown processor type") )
Functions ¶
Types ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message is a message on the event stream
type Processor ¶
type Processor interface { ProcessNextMessage(context.Context, logging.Logger) error Close() error }
Processor handles writing and reading to/from the event stream
type ProcessorFactory ¶
ProcessorFactory takes in configuration and returns a stream Processor
func NewConsumerFactory ¶
func NewConsumerFactory(factory serviceConsumerFactory) ProcessorFactory
NewConsumerFactory returns a processorFactory for the given service consumer
type ProcessorManager ¶
type ProcessorManager struct {
// contains filtered or unexported fields
}
ProcessorManager supervises the Processor lifecycle; it will use the given configuration and ProcessorFactory to keep a Processor active
func NewProcessorManager ¶
func NewProcessorManager(conf cfg.Config, factory ProcessorFactory) (*ProcessorManager, error)
NewProcessorManager creates a new *ProcessorManager ready for listening
func (*ProcessorManager) Close ¶
func (c *ProcessorManager) Close() error
Close tells the workers to shutdown and waits for them to all stop
func (*ProcessorManager) Listen ¶
func (c *ProcessorManager) Listen() error
Listen sets a client to listen for and handle incoming messages
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
producer reads from the socket and writes to the event stream
func NewProducer ¶
NewProducer creates a producer using the given config
func (*Producer) ProcessNextMessage ¶
ProcessNextMessage takes in a Message from the IPC socket and writes it to Kafka