Documentation ¶
Index ¶
- type Binding
- func (b *Binding) Equal(bind *Binding) bool
- func (b *Binding) GetExchange() string
- func (b *Binding) GetName() string
- func (b *Binding) GetQueue() string
- func (b *Binding) GetRoutingKey() string
- func (b *Binding) Marshal(protoVersion string) (data []byte, err error)
- func (b *Binding) MatchDirect(exchange string, routingKey string) bool
- func (b *Binding) MatchFanout(exchange string) bool
- func (b *Binding) MatchHeader(exchange string, headers *amqp.Table) bool
- func (b *Binding) MatchTopic(exchange string, routingKey string) bool
- func (b *Binding) Unmarshal(data []byte, protoVersion string) (err error)
- type MatchType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binding ¶
type Binding struct { Queue string Exchange string RoutingKey string Arguments *amqp.Table MatchType MatchType // contains filtered or unexported fields }
Binding represents AMQP-binding
func NewBinding ¶
func NewBinding(queue string, exchange string, routingKey string, arguments *amqp.Table, topic bool) (*Binding, error)
NewBinding returns new instance of Binding
func (*Binding) Equal ¶
Equal returns is given binding equal to current with compare exchange, routing key and queue
func (*Binding) GetExchange ¶
GetExchange returns binding's exchange
func (*Binding) GetRoutingKey ¶
GetRoutingKey returns binding's routing key
func (*Binding) MatchDirect ¶
MatchDirect check is message can be routed from direct-exchange to queue with compare exchange and routing key
func (*Binding) MatchFanout ¶
MatchFanout check is message can be routed from fanout-exchange to queue with compare only exchange
func (*Binding) MatchHeader ¶
MatchHeader checks whether the message can be routed on `b` for a header exchange type.
func (*Binding) MatchTopic ¶
MatchTopic check is message can be routed from topic-exchange to queue with compare exchange and match topic-pattern with routing key