Documentation ¶
Index ¶
- Constants
- type MessageQueueImpl
- func (t *MessageQueueImpl) AddMessage(ctx context.Context, q msgqueue.Queue, msg *msgqueue.Message) error
- func (t *MessageQueueImpl) IsReady() bool
- func (t *MessageQueueImpl) RegisterTenant(ctx context.Context, tenantId string) error
- func (t *MessageQueueImpl) Subscribe(q msgqueue.Queue, preAck msgqueue.AckHook, postAck msgqueue.AckHook) (func() error, error)
- type MessageQueueImplOpt
- type MessageQueueImplOpts
Constants ¶
View Source
const MAX_RETRY_COUNT = 15
View Source
const RETRY_INTERVAL = 2 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageQueueImpl ¶
type MessageQueueImpl struct {
// contains filtered or unexported fields
}
MessageQueueImpl implements MessageQueue interface using AMQP.
func New ¶
func New(fs ...MessageQueueImplOpt) (func() error, *MessageQueueImpl)
New creates a new MessageQueueImpl.
func (*MessageQueueImpl) AddMessage ¶
func (t *MessageQueueImpl) AddMessage(ctx context.Context, q msgqueue.Queue, msg *msgqueue.Message) error
AddMessage adds a msg to the queue.
func (*MessageQueueImpl) IsReady ¶
func (t *MessageQueueImpl) IsReady() bool
func (*MessageQueueImpl) RegisterTenant ¶
func (t *MessageQueueImpl) RegisterTenant(ctx context.Context, tenantId string) error
type MessageQueueImplOpt ¶
type MessageQueueImplOpt func(*MessageQueueImplOpts)
func WithLogger ¶
func WithLogger(l *zerolog.Logger) MessageQueueImplOpt
func WithURL ¶
func WithURL(url string) MessageQueueImplOpt
type MessageQueueImplOpts ¶
type MessageQueueImplOpts struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.