Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMQPChannel ¶
type AMQPChannel interface { Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error NotifyClose(receiver chan *amqp.Error) chan *amqp.Error NotifyFlow(c chan bool) chan bool Close() error NotifyPublish(confirm chan amqp.Confirmation) chan amqp.Confirmation Confirm(noWait bool) error }
type AMQPConnection ¶
type AMQPConnection interface { }
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(amqpConn AMQPConnection, closeCh chan struct{}) *Connection
func (*Connection) AMQPConnection ¶
func (c *Connection) AMQPConnection() AMQPConnection
func (*Connection) NotifyClose ¶
func (c *Connection) NotifyClose() chan struct{}
type Option ¶
type Option func(p *Publisher)
func WithConfirmation ¶
WithConfirmation tells publisher to turn on publisher confirm mode. The buffer option tells how many messages might be in-flight. Once limit is reached no new messages could be published. The confirmation result is returned via msg.ResultCh.
func WithContext ¶
func WithInitFunc ¶
func WithInitFunc(f func(conn AMQPConnection) (AMQPChannel, error)) Option
func WithLogger ¶
func WithNotify ¶
func WithRestartSleep ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func (*Publisher) NotifyClosed ¶
func (p *Publisher) NotifyClosed() <-chan struct{}
Click to show internal directories.
Click to hide internal directories.