Documentation ¶
Index ¶
- type Config
- type Connector
- func (c *Connector) Close() error
- func (c *Connector) Connect() *Connector
- func (c *Connector) Consume(consumeConfig *ConsumeConfig, handler MessageHandler) error
- func (c *Connector) ExchangeDeclare(ec *ExchangeConfig) error
- func (c *Connector) GetChannel() (*amqp.Channel, error)
- func (c *Connector) Publish() *Publisher
- func (c *Connector) QueueBind(qbc *QueueBindConfig) error
- func (c *Connector) QueueDeclare(qc *QueueConfig) error
- func (c *Connector) QueueDelete(qc *QueueConfig) error
- type ConsumeConfig
- type ExchangeConfig
- type MessageHandler
- type Publisher
- func (p *Publisher) AsPersistent() *Publisher
- func (p *Publisher) AsTransient() *Publisher
- func (p *Publisher) Do() error
- func (p *Publisher) ToExchange(name string) *Publisher
- func (p *Publisher) ToQueue(name string) *Publisher
- func (p *Publisher) WithContentType(contentType string) *Publisher
- func (p *Publisher) WithData(data []byte) *Publisher
- func (p *Publisher) WithExpiration(expiration string) *Publisher
- func (p *Publisher) WithStruct(obj interface{}) *Publisher
- type QueueBindConfig
- type QueueConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
func (*Connector) Consume ¶
func (c *Connector) Consume(consumeConfig *ConsumeConfig, handler MessageHandler) error
func (*Connector) ExchangeDeclare ¶
func (c *Connector) ExchangeDeclare(ec *ExchangeConfig) error
func (*Connector) QueueBind ¶
func (c *Connector) QueueBind(qbc *QueueBindConfig) error
func (*Connector) QueueDeclare ¶
func (c *Connector) QueueDeclare(qc *QueueConfig) error
func (*Connector) QueueDelete ¶ added in v2.1.0
func (c *Connector) QueueDelete(qc *QueueConfig) error
type ConsumeConfig ¶
type ConsumeConfig struct { Queue string Consumer string AutoAck bool Exclusive bool NoLocal bool NoWait bool Args amqp.Table PrefetchCount int }
func NewAutoAckConsumeConfig ¶
func NewAutoAckConsumeConfig(name string, consumer string) *ConsumeConfig
func NewManualAckConsumeConfig ¶
func NewManualAckConsumeConfig(name string, consumer string) *ConsumeConfig
type ExchangeConfig ¶
type ExchangeConfig struct { Name string Type string Durable bool AutoDelete bool Internal bool NoWait bool Args amqp.Table }
func NewDurableExchangeConfig ¶
func NewDurableExchangeConfig(name, typeName string) *ExchangeConfig
func NewTransientExchangeConfig ¶
func NewTransientExchangeConfig(name, typeName string) *ExchangeConfig
type MessageHandler ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func (*Publisher) AsPersistent ¶
func (*Publisher) AsTransient ¶
func (*Publisher) ToExchange ¶
func (*Publisher) WithContentType ¶
func (*Publisher) WithExpiration ¶
func (*Publisher) WithStruct ¶
type QueueBindConfig ¶
type QueueBindConfig struct { QueueName string ExchangeName string RoutingKey string NoWait bool Args amqp.Table }
func NewQueueBindConfig ¶ added in v2.1.0
func NewQueueBindConfig(queueName, exchangeName string) *QueueBindConfig
type QueueConfig ¶
type QueueConfig struct { Name string Durable bool AutoDelete bool Exclusive bool NoWait bool Args amqp.Table }
func NewDurableQueueConfig ¶
func NewDurableQueueConfig(name string) *QueueConfig
func NewTransientQueueConfig ¶
func NewTransientQueueConfig(name string) *QueueConfig
Click to show internal directories.
Click to hide internal directories.