Documentation ¶
Index ¶
- type Config
- type Connector
- func (c *Connector) Close() error
- func (c *Connector) Connect() *Connector
- func (c *Connector) Consume(cc *ConsumeConfig, handler MessageHandler) error
- func (c *Connector) ExchangeDeclare(ec *ExchangeConfig) error
- func (c *Connector) GetChannel() (*amqp.Channel, error)
- func (c *Connector) Publish(exchangeName, routingKey string, body []byte, deliveryMode uint8) error
- func (c *Connector) PublishStructToExchange(name string, obj interface{}, deliveryMode uint8) error
- func (c *Connector) PublishStructToQueue(name string, obj interface{}, deliveryMode uint8) error
- func (c *Connector) PublishToExchange(name string, body []byte, deliveryMode uint8) error
- func (c *Connector) PublishToQueue(name string, body []byte, deliveryMode uint8) error
- func (c *Connector) QueueBind(qbc *QueueBindConfig) error
- func (c *Connector) QueueDeclare(qc *QueueConfig) error
- type ConsumeConfig
- type ExchangeConfig
- type MessageHandler
- type QueueBindConfig
- type QueueConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func (*Connector) Consume ¶ added in v1.2.0
func (c *Connector) Consume(cc *ConsumeConfig, handler MessageHandler) error
func (*Connector) ExchangeDeclare ¶ added in v1.4.0
func (c *Connector) ExchangeDeclare(ec *ExchangeConfig) error
func (*Connector) PublishStructToExchange ¶ added in v1.4.0
func (*Connector) PublishStructToQueue ¶
func (*Connector) PublishToExchange ¶ added in v1.4.0
func (*Connector) PublishToQueue ¶
func (*Connector) QueueBind ¶ added in v1.4.0
func (c *Connector) QueueBind(qbc *QueueBindConfig) error
func (*Connector) QueueDeclare ¶
func (c *Connector) QueueDeclare(qc *QueueConfig) error
type ConsumeConfig ¶ added in v1.2.0
type ConsumeConfig struct { Queue string Consumer string AutoAck bool Exclusive bool NoLocal bool NoWait bool Args amqp.Table PrefetchCount int }
func NewAutoAckConsumeConfig ¶ added in v1.2.0
func NewAutoAckConsumeConfig(name string, consumer string) *ConsumeConfig
func NewManualAckConsumeConfig ¶ added in v1.2.0
func NewManualAckConsumeConfig(name string, consumer string) *ConsumeConfig
type ExchangeConfig ¶ added in v1.4.0
type ExchangeConfig struct { Name string Type string Durable bool AutoDelete bool Internal bool NoWait bool Args amqp.Table }
func NewDurableExchangeConfig ¶ added in v1.4.0
func NewDurableExchangeConfig(name, typeName string) *ExchangeConfig
func NewTransientExchangeConfig ¶ added in v1.4.0
func NewTransientExchangeConfig(name, typeName string) *ExchangeConfig
type MessageHandler ¶ added in v1.2.0
type QueueBindConfig ¶ added in v1.4.0
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.