Documentation ¶
Index ¶
- type Channel
- type ConcreteChannel
- func (r *ConcreteChannel) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args Table) (<-chan ExtDelivery, error)
- func (r *ConcreteChannel) Get(queue string, autoAck bool) (msg ExtDelivery, ok bool, err error)
- func (r *ConcreteChannel) GetURI() (URI, bool)
- func (r *ConcreteChannel) PublishWithContext(_ context.Context, exchange, key string, mandatory, immediate bool, ...) error
- func (r *ConcreteChannel) RawConsume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args Table) (<-chan Delivery, error)
- func (r *ConcreteChannel) WrapDelivery(delivery *Delivery, queue string, autoAck bool) ExtDelivery
- type ConcreteDelivery
- func (c *ConcreteDelivery) AutoAck() bool
- func (c *ConcreteDelivery) Queue() string
- func (c *ConcreteDelivery) Raw() *Delivery
- func (c *ConcreteDelivery) RunOnScopeWithContext(ctx context.Context, handler Handler)
- func (c *ConcreteDelivery) RunWithContext(ctx context.Context) (context.Context, func(err error))
- type Confirmation
- type Consumer
- type Delivery
- type Error
- type ExtChannel
- type ExtDelivery
- type Handler
- type InternalConsumer
- type Publisher
- type Publishing
- type Queue
- type Return
- type Table
- type URI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcreteChannel ¶
func NewChannel ¶
func NewChannel(c *amqp.Channel, url string) *ConcreteChannel
func NewChannelWithURI ¶
func NewChannelWithURI(c *amqp.Channel, uri URI) *ConcreteChannel
func (*ConcreteChannel) Consume ¶
func (r *ConcreteChannel) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args Table) (<-chan ExtDelivery, error)
func (*ConcreteChannel) Get ¶
func (r *ConcreteChannel) Get(queue string, autoAck bool) (msg ExtDelivery, ok bool, err error)
func (*ConcreteChannel) GetURI ¶
func (r *ConcreteChannel) GetURI() (URI, bool)
func (*ConcreteChannel) PublishWithContext ¶
func (r *ConcreteChannel) PublishWithContext(_ context.Context, exchange, key string, mandatory, immediate bool, msg Publishing) error
func (*ConcreteChannel) RawConsume ¶
func (*ConcreteChannel) WrapDelivery ¶
func (r *ConcreteChannel) WrapDelivery(delivery *Delivery, queue string, autoAck bool) ExtDelivery
type ConcreteDelivery ¶
type ConcreteDelivery struct {
// contains filtered or unexported fields
}
func NewDelivery ¶
func NewDelivery(raw *Delivery, queue string, autoAck bool) *ConcreteDelivery
func (*ConcreteDelivery) AutoAck ¶
func (c *ConcreteDelivery) AutoAck() bool
func (*ConcreteDelivery) Queue ¶
func (c *ConcreteDelivery) Queue() string
func (*ConcreteDelivery) Raw ¶
func (c *ConcreteDelivery) Raw() *Delivery
func (*ConcreteDelivery) RunOnScopeWithContext ¶
func (c *ConcreteDelivery) RunOnScopeWithContext(ctx context.Context, handler Handler)
func (*ConcreteDelivery) RunWithContext ¶
type Confirmation ¶
type Confirmation = amqp.Confirmation
type Consumer ¶
type Consumer interface {
Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args Table) (<-chan ExtDelivery, error)
}
type ExtChannel ¶
type ExtChannel interface { Publisher Consumer Ack(tag uint64, multiple bool) error Cancel(consumer string, noWait bool) error Close() error Confirm(noWait bool) error ExchangeBind(destination, key, source string, noWait bool, args Table) error ExchangeDeclare(name, kind string, durable, autoDelete, internal, noWait bool, args Table) error ExchangeDeclarePassive(name, kind string, durable, autoDelete, internal, noWait bool, args Table) error ExchangeDelete(name string, ifUnused, noWait bool) error ExchangeUnbind(destination, key, source string, noWait bool, args Table) error Flow(active bool) error Get(queue string, autoAck bool) (msg ExtDelivery, ok bool, err error) Nack(tag uint64, multiple bool, requeue bool) error NotifyCancel(c chan string) chan string NotifyClose(c chan *Error) chan *Error NotifyConfirm(ack, nack chan uint64) (chan uint64, chan uint64) NotifyFlow(c chan bool) chan bool NotifyPublish(confirm chan Confirmation) chan Confirmation NotifyReturn(c chan Return) chan Return Qos(prefetchCount, prefetchSize int, global bool) error QueueBind(name, key, exchange string, noWait bool, args Table) error QueueDeclare(name string, durable, autoDelete, exclusive, noWait bool, args Table) (Queue, error) QueueDeclarePassive(name string, durable, autoDelete, exclusive, noWait bool, args Table) (Queue, error) QueueDelete(name string, ifUnused, ifEmpty, noWait bool) (int, error) QueueInspect(name string) (Queue, error) QueuePurge(name string, noWait bool) (int, error) QueueUnbind(name, key, exchange string, args Table) error Recover(requeue bool) error Reject(tag uint64, requeue bool) error Tx() error TxCommit() error TxRollback() error GetURI() (URI, bool) }
ExtChannel is interface for enhance iamqp.Channel Drop Publish, PublishWithDeferredConfirm method
type ExtDelivery ¶
type InternalConsumer ¶
type InternalConsumer interface { RawConsume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args Table) (<-chan Delivery, error) WrapDelivery(delivery *Delivery, queue string, autoAck bool) ExtDelivery }
InternalConsumer for internal to reduce create goroutine
type Publishing ¶
type Publishing = amqp.Publishing
Click to show internal directories.
Click to hide internal directories.