Documentation ¶
Index ¶
- type EventBus
- func (b *EventBus) Ack(receive *rabbitmqpools.ConsumeReceive, msg *amqp.Delivery) error
- func (b *EventBus) AddHandler(m eh.EventType, h eh.EventHandler, args interface{}) error
- func (b *EventBus) Close() error
- func (b *EventBus) ErrorPrint()
- func (b *EventBus) Errors() <-chan error
- func (b *EventBus) HandlerType() eh.EventHandlerType
- func (b *EventBus) Publish(exChangeName string, exChangeType string, queueName string, route string, ...) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBus ¶
type EventBus struct {
// contains filtered or unexported fields
}
func NewEventBus ¶
NewEventBus creates an EventBus, with optional settings.
func (*EventBus) Ack ¶
func (b *EventBus) Ack(receive *rabbitmqpools.ConsumeReceive, msg *amqp.Delivery) error
func (*EventBus) AddHandler ¶
AddHandler implements the AddHandler method of the contracts.EventBus interface.
func (*EventBus) ErrorPrint ¶
func (b *EventBus) ErrorPrint()
func (*EventBus) HandlerType ¶
func (b *EventBus) HandlerType() eh.EventHandlerType
HandlerType implements the HandlerType method of the EventHandler interface.
type Option ¶
Option is an option setter used to configure creation.
func WithCodec ¶
func WithCodec(codec msgCodec.EventCodec) Option
WithCodec uses the specified codec for encoding events.
func WithLogger ¶
func WithMessageTimeToAlive ¶
messageTime to alive
Click to show internal directories.
Click to hide internal directories.