Versions in this module Expand all Collapse all v0 v0.0.1 Apr 4, 2023 Changes in this version + const ErrChannelClosed + const ErrConnectionClosed + const ErrEmptyQueueName + const ErrFailedToAcceptPublishing + const ErrFailedToAckPublishing + const ErrFlowDisabled + const ErrIllegalQos + const ErrInvalidURL + const ErrPublisherClosed + const ErrUninitialisedConnection + const ErrUninitialisedPublisher + const Persistent + const Transient + type Acknowledger interface + Ack func() error + Nack func() error + type Connection struct + func Connect(ctx context.Context, url string, l Printer) (*Connection, error) + func (c *Connection) Close() error + func (c *Connection) CreatePublisher() (*Publisher, error) + func (c *Connection) QueueClear(ctx context.Context, queue string) (int, error) + func (c *Connection) QueueConsume(queue string) (<-chan *Message, func(), error) + func (c *Connection) QueueDelete(ctx context.Context, queue string, ifUnused bool, ifEmpty bool) (int, error) + func (c *Connection) QueueLen(ctx context.Context, queue string) (int, error) + type Message struct + func (m *Message) Ack() error + func (m *Message) Acknowledger() Acknowledger + func (m *Message) Body() []byte + func (m *Message) Nack() error + func (m *Message) String() string + func (m *Message) Timestamp() time.Time + type Printer interface + Printf func(format string, v ...interface{}) + type Publisher struct + func (p *Publisher) Close() error + func (p *Publisher) Publish(ctx context.Context, queue string, msg []byte) error