Documentation
¶
Index ¶
- Constants
- Variables
- func InitTracer()
- type Callback
- type ChannelKey
- type Connection
- func (c *Connection) Close(ctx context.Context) error
- func (c *Connection) Connect(ctx context.Context, errGroup *errgroup.Group) error
- func (c *Connection) Consume(ctx context.Context, queue, consumer string, ...) (<-chan amqp.Delivery, error)
- func (c *Connection) ExchangeDeclare(e *Exchange) error
- func (c *Connection) GetChannelFromPool(key ChannelKey) (ch *amqp.Channel, err error)
- func (c *Connection) IsClosed() bool
- func (c *Connection) Publish(ctx context.Context, exchange, key string, mandatory, immediate bool, ...) error
- func (c *Connection) QueueBind(name, key string, q *Queue, args amqp.Table) error
- func (c *Connection) QueueDeclare(name string, q *Queue) (amqp.Queue, error)
- type Consumer
- type DLQConfig
- type Exchange
- type PubConn
- type Publisher
- func (p *Publisher) Connect() error
- func (p *Publisher) SendMessage(ctx context.Context, body []byte, typ string) error
- func (p *Publisher) SendMessageToExchangeWithHeaders(ctx context.Context, exchange string, body []byte, route string, exp string, ...) error
- func (p *Publisher) SendMessageWithHeaders(ctx context.Context, body []byte, route string, exp string, ...) error
- func (p *Publisher) SendMessageWithRoute(ctx context.Context, body []byte, route string, typ string) error
- type Queue
- type SubConn
Constants ¶
View Source
const ( ExchangeDirect exchangeType = "direct" ExchangeFanout exchangeType = "fanout" ExchangeTopic exchangeType = "topic" ExchangeHeaders exchangeType = "headers" )
Variables ¶
View Source
var AppName = "app"
Functions ¶
func InitTracer ¶
func InitTracer()
Types ¶
type ChannelKey ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(dsn string, backoffPolicy []time.Duration, prefetchCount uint16) *Connection
func (*Connection) ExchangeDeclare ¶
func (c *Connection) ExchangeDeclare(e *Exchange) error
func (*Connection) GetChannelFromPool ¶
func (c *Connection) GetChannelFromPool(key ChannelKey) (ch *amqp.Channel, err error)
func (*Connection) IsClosed ¶
func (c *Connection) IsClosed() bool
func (*Connection) Publish ¶
func (c *Connection) Publish(ctx context.Context, exchange, key string, mandatory, immediate bool, msg *amqp.Publishing, ) error
func (*Connection) QueueDeclare ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
func NewConsumerWithRoute ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
func NewPublisherWithRoute ¶
func (*Publisher) SendMessage ¶
func (*Publisher) SendMessageToExchangeWithHeaders ¶
func (*Publisher) SendMessageWithHeaders ¶
type SubConn ¶
type SubConn interface {
ExchangeDeclare(e *Exchange) error
QueueDeclare(name string, q *Queue) (amqp.Queue, error)
QueueBind(name, key string, q *Queue, args amqp.Table) error
Consume(ctx context.Context, queue, consumer string, autoAck, exclusive, noLocal, noWait bool,
args amqp.Table) (<-chan amqp.Delivery, error)
IsClosed() bool
}
Click to show internal directories.
Click to hide internal directories.