Documentation ¶
Index ¶
- func NewMedium(ctx context.Context, logger logrus.FieldLogger) *medium
- func RunConsumer(ctx context.Context, uri, user, password, name string, ...) *retryableConsumer
- type Channel
- func (c Channel) Accept(key string) (established, terminated, teared chan struct{})
- func (c Channel) Await()
- func (c Channel) Clean()
- func (c Channel) Context() context.Context
- func (c *Channel) Name() string
- func (c Channel) Notify(events *sync.Map)
- func (c Channel) Remove(key string)
- func (c *Channel) Start()
- func (c *Channel) Stop()
- type Connection
- func (c Connection) Accept(key string) (established, terminated, teared chan struct{})
- func (c Connection) Await()
- func (c *Connection) Channel(prefetchCount, prefetchSize int) *amqp.Channel
- func (c Connection) Clean()
- func (c Connection) Context() context.Context
- func (c *Connection) Name() string
- func (c Connection) Notify(events *sync.Map)
- func (c Connection) Remove(key string)
- func (c *Connection) Start()
- func (c *Connection) Stop()
- type Medium
- type MessageHandler
- type Publisher
- type RetryLimitReached
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunConsumer ¶
func RunConsumer( ctx context.Context, uri, user, password, name string, prefetchCount, prefetchSize, count, limit int, handler MessageHandler, rlr RetryLimitReached, logger logrus.FieldLogger, ) *retryableConsumer
Types ¶
type Channel ¶
type Channel struct { *Connection *amqp.Channel // contains filtered or unexported fields }
func NewChannel ¶
func NewChannel( id int, connection *Connection, prefetchCount, prefetchSize int, logger logrus.FieldLogger, ) *Channel
type Connection ¶
type Connection struct { *amqp.Connection // contains filtered or unexported fields }
func NewConnection ¶
func NewConnection( ctx context.Context, uri, user, password string, logger logrus.FieldLogger, ) *Connection
func (Connection) Accept ¶
func (c Connection) Accept(key string) (established, terminated, teared chan struct{})
func (*Connection) Channel ¶
func (c *Connection) Channel(prefetchCount, prefetchSize int) *amqp.Channel
func (*Connection) Name ¶
func (c *Connection) Name() string
func (*Connection) Start ¶
func (c *Connection) Start()
func (*Connection) Stop ¶
func (c *Connection) Stop()
type Publisher ¶
type Publisher interface { Publish(exchange, topic string, data []byte) PublishJson(exchange, topic string, data interface{}) error }
func RunPublisher ¶
type RetryLimitReached ¶
Click to show internal directories.
Click to hide internal directories.