Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MessageProcessor ¶
type MessageProcessor struct {
// contains filtered or unexported fields
}
func NewMessageProcessor ¶
func NewMessageProcessor(opts MessageProcessorOpts) (*MessageProcessor, error)
NewMessageProcessor will create a new processor for a given customer id
func (*MessageProcessor) Start ¶
func (p *MessageProcessor) Start() error
Start will start processing messages
func (*MessageProcessor) Stop ¶
func (p *MessageProcessor) Stop() error
Stop will stop processing messages
type MessageProcessorOpts ¶
type MessageProcessorOpts struct { Logger logger.Logger CompanyID string Provider Provider NatsConnection *nats.Conn DumpMessagesDir string TraceNats bool ConsumerPrefix string }
MessageProcessorOpts is the options for the message processor
type Provider ¶ added in v1.0.0
type Provider interface { // Start the provider and return an error or nil if ok Start() error // Stop the provider and return an error or nil if ok Stop() error // Process data received and return an error or nil if processed ok Process(data datatypes.ChangeEventPayload) error // Migrate will tell the provider to do any migration work and return an error or nil if ok Migrate() error }
Click to show internal directories.
Click to hide internal directories.