Documentation
¶
Index ¶
- type IChannel
- type IChannelFactory
- type RmqChannel
- func (channel *RmqChannel) Cancel(consumer string, noWait bool) error
- func (channel *RmqChannel) Close() error
- func (channel *RmqChannel) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, ...) (<-chan amqp.Delivery, error)
- func (channel *RmqChannel) ExchangeDeclare(name, kind string, durable, autoDelete, internal, noWait, passive bool, ...) error
- func (channel *RmqChannel) ExchangeDelete(name string, ifUnused, noWait bool) error
- func (channel *RmqChannel) Get(queue string, autoAck bool) (amqp.Delivery, bool, error)
- func (channel *RmqChannel) GetId() uuid.UUID
- func (channel *RmqChannel) IsOpen() bool
- func (channel *RmqChannel) PublishWithContext(ctx context.Context, exchange, key string, mandatory, immediate bool, ...) error
- func (channel *RmqChannel) QueueBind(name, key, exchange string, noWait bool, args amqp.Table) error
- func (channel *RmqChannel) QueueDeclare(name string, durable, autoDelete, exclusive, noWait bool, passive bool, ...) error
- func (channel *RmqChannel) QueueDelete(name string, ifUnused, ifEmpty, noWait bool) error
- func (channel *RmqChannel) QueueUnbind(name, key, exchange string, args amqp.Table) error
- func (channel *RmqChannel) SetQos(prefetchCount int, prefetchSize int) error
- type RmqChannelFactory
- type RmqConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IChannel ¶
type IChannel interface {
GetId() uuid.UUID
IsOpen() bool
Close() error
QueueDeclare(name string, durable, autoDelete, exclusive, noWait bool, passive bool, args amqp.Table) error
QueueBind(name, key, exchange string, noWait bool, args amqp.Table) error
QueueDelete(name string, ifUnused, ifEmpty, noWait bool) error
QueueUnbind(name, key, exchange string, args amqp.Table) error
ExchangeDeclare(name, kind string, durable, autoDelete, internal, noWait, passive bool, args amqp.Table) error
ExchangeDelete(name string, ifUnused, noWait bool) error
PublishWithContext(ctx context.Context, exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
Get(queue string, autoAck bool) (amqp.Delivery, bool, error)
SetQos(prefetchCount int, prefetchSize int) error
Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error)
Cancel(consumer string, noWait bool) error
}
type IChannelFactory ¶
type RmqChannel ¶
func (*RmqChannel) Close ¶
func (channel *RmqChannel) Close() error
func (*RmqChannel) ExchangeDeclare ¶
func (*RmqChannel) ExchangeDelete ¶
func (channel *RmqChannel) ExchangeDelete(name string, ifUnused, noWait bool) error
func (*RmqChannel) GetId ¶
func (channel *RmqChannel) GetId() uuid.UUID
func (*RmqChannel) IsOpen ¶
func (channel *RmqChannel) IsOpen() bool
func (*RmqChannel) PublishWithContext ¶
func (channel *RmqChannel) PublishWithContext(ctx context.Context, exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
func (*RmqChannel) QueueDeclare ¶
func (*RmqChannel) QueueDelete ¶
func (channel *RmqChannel) QueueDelete(name string, ifUnused, ifEmpty, noWait bool) error
func (*RmqChannel) QueueUnbind ¶
func (channel *RmqChannel) QueueUnbind(name, key, exchange string, args amqp.Table) error
type RmqChannelFactory ¶
type RmqChannelFactory struct {
// contains filtered or unexported fields
}
func NewRmqChannelFactory ¶
func NewRmqChannelFactory(connection *RmqConnection) *RmqChannelFactory
func (RmqChannelFactory) New ¶
func (factory RmqChannelFactory) New() (IChannel, error)
func (RmqChannelFactory) Renew ¶
func (factory RmqChannelFactory) Renew(channel IChannel) error
type RmqConnection ¶
type RmqConnection struct {
// contains filtered or unexported fields
}
func NewConn ¶
func NewConn(conf *common.RmqConfig) *RmqConnection
func (*RmqConnection) Close ¶
func (conn *RmqConnection) Close() error
func (*RmqConnection) IsOpen ¶
func (conn *RmqConnection) IsOpen() bool
func (*RmqConnection) NewChannel ¶
func (conn *RmqConnection) NewChannel() (*RmqChannel, error)
func (*RmqConnection) Open ¶
func (conn *RmqConnection) Open() (err error)
Click to show internal directories.
Click to hide internal directories.