Documentation ¶
Overview ¶
Package mqi is Message Queue Interface using AMQP
Requires active running instance of RabbitMQ server
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Channel ¶
type Channel interface { URI() string Prefetch() int Exchange() Exchange Broadcast() Exchange Conn() *amqp.Connection Sub() *amqp.Channel Pub() *amqp.Channel UpdateChan() chan<- Channel KillChan() chan bool ErrChan() chan *amqp.Error IsStarted() bool IsOptionalQueue() bool WithURI(uri string) Channel WithPrefetch(prefetch int) Channel WithExchange(ex Exchange) Channel WithBroadcast(ex Exchange) Channel WithConn(conn *amqp.Connection) Channel WithSub(sub *amqp.Channel) Channel WithPub(pub *amqp.Channel) Channel WithUpdateChan(c chan<- Channel) Channel WithKillChan(c chan bool) Channel WithErrChan(c chan *amqp.Error) Channel WithStarted(b bool) Channel WithOptionalQueue(b bool) Channel Start() // contains filtered or unexported methods }
Channel interface
type Consumer ¶
type Consumer interface { Name() string TypeString() string IsAutoAck() bool IsExclusive() bool IsNoLocal() bool IsNoWait() bool Func() func(msg amqp.Delivery) error WithName(name string) Consumer WithTypeString(str string) Consumer WithAutoAck(b bool) Consumer WithExclusive(b bool) Consumer WithNoLocal(b bool) Consumer WithNoWait(b bool) Consumer WithFunc(fn func(msg amqp.Delivery) error) Consumer // contains filtered or unexported methods }
Consumer interface
func NewTempConsumer ¶ added in v0.4.0
NewTempConsumer constructs a temporary consumer
type Exchange ¶
type Exchange interface { Name() string TypeString() string IsDurable() bool IsAutoDeleteEnabled() bool IsExclusive() bool IsInternal() bool IsNoWait() bool Args() amqp.Table CountQueues() int QueueAt(i int) Queue CountAllConsumers() int WithName(name string) Exchange WithTypeString(str string) Exchange WithDurable(b bool) Exchange WithAutoDeleteEnabled(b bool) Exchange WithExclusive(b bool) Exchange WithInternal(b bool) Exchange WithNoWait(b bool) Exchange WithArgs(t amqp.Table) Exchange AddQueue(q Queue) Exchange UpdateQueue(q Queue) Exchange // contains filtered or unexported methods }
Exchange interface
func NewBroadcast ¶ added in v0.4.0
NewBroadcast constructs an exchange for broadcast
type Queue ¶
type Queue interface { Name() string TypeString() string IsDurable() bool IsAutoDeleteEnabled() bool IsExclusive() bool IsNoWait() bool Args() amqp.Table Ref() *amqp.Queue CountTopics() int TopicAt(i int) Topic CountConsumers() int ConsumerAt(i int) Consumer WithName(name string) Queue WithDurable(b bool) Queue WithAutoDeleteEnabled(b bool) Queue WithExclusive(b bool) Queue WithNoWait(b bool) Queue WithArgs(t amqp.Table) Queue WithRef(ref *amqp.Queue) Queue AddTopic(tp Topic) Queue AddConsumer(cs Consumer) Queue // contains filtered or unexported methods }
Queue interface
func AddTempQueue ¶ added in v0.2.0
AddTempQueue adds a queue which gets auto-deleted after execution of consumer function
func NewBroadcastQueue ¶ added in v0.4.0
func NewBroadcastQueue() Queue
NewBroadcastQueue constructs a broadcast queue
func NewTempQueue ¶ added in v0.4.0
NewTempQueue constructs a temporary queue
Click to show internal directories.
Click to hide internal directories.