Documentation
¶
Overview ¶
Package workers holds the main application logic worker, that listens to read messages and sends then to producer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeWorker ¶
BridgeWorker contains data for bridge worker that does the actual job - handles messages transfer from RabbitMQ to Kafka
func NewBridgeWorker ¶
func NewBridgeWorker(config config.WorkerConfig, storage storage.PersistentStorage, producer producer.Producer, statsClient client.Client) (*BridgeWorker, error)
NewBridgeWorker creates instance of BridgeWorker
func (*BridgeWorker) Execute ¶
func (w *BridgeWorker) Execute()
Execute runs the service logic once in sync way
func (*BridgeWorker) Go ¶
func (w *BridgeWorker) Go(ctx context.Context)
Go runs the service forever in async way in go-routine
func (*BridgeWorker) MessageHandler ¶
func (w *BridgeWorker) MessageHandler(body []byte, pipe config.Pipe) error
MessageHandler is a handler function for new messages from AMQP
Click to show internal directories.
Click to hide internal directories.