Documentation ¶
Index ¶
Constants ¶
View Source
const PriorityProperty = "x-max-priority"
Variables ¶
This section is empty.
Functions ¶
func NewBinder ¶
func NewBinder(config *ConnectionConfig) (*binder, error)
Types ¶
type BindConfig ¶
type BindConfig struct { Exchange string // required RoutingKey string // required Queue string // required // optional ExchangeKind Kind ExchangeDurable bool ExchangeAutoDelete bool ExchangeInternal bool ExchangeNoWait bool ExchangeArgs map[string]interface{} QueueDurable bool QueueAutoDelete bool QueueExclusive bool QueueNoWait bool QueueArgs map[string]interface{} BindNoWait bool BindArgs map[string]interface{} }
type ConnectionConfig ¶
type ConnectionConfig struct { Address string `mapstructure:"address"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` Vhost string `mapstructure:"vhost"` }
func (*ConnectionConfig) Validate ¶
func (c *ConnectionConfig) Validate() error
type ConnectionsConfig ¶
type ConnectionsConfig map[string]*ConnectionConfig
func (*ConnectionsConfig) Validate ¶
func (c *ConnectionsConfig) Validate() error
type ConsumerConfig ¶
type ConsumerMetrics ¶ added in v1.6.6
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container is a simple container for holding named rabbit connections.
func NewContainer ¶
func NewContainer() *Container
func (*Container) AddConnection ¶
func (cont *Container) AddConnection(name string, cfg *ConnectionConfig) error
AddConnection adds a named connection to a container. It's possible to create consumer or producer on created connection later using CreateProducer ot CreateConsumer.
func (*Container) CreateConsumer ¶
func (cont *Container) CreateConsumer(consumerCfg *ConsumerConfig) (*Consumer, error)
CreateConsumer creates a new rabbit consumer by a connection name and subscribes it to a given queue
func (*Container) CreateProducer ¶
func (cont *Container) CreateProducer(producerCfg *ProducerConfig) (*Producer, error)
type Kind ¶
type Kind string
const KindDirect Kind = "direct"
const KindFanOut Kind = "fanout"
const KindHeaders Kind = "headers"
const KindTopic Kind = "topic"
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func (*Message) IsRedelivered ¶
type ProducerConfig ¶
type ProducerConfig struct { ConnectionName string Bindings []*BindConfig }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.