Documentation ¶
Overview ¶
package
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotReady = errors.New("connection/channel not ready for use") ErrAlreadyClosed = errors.New("manager already closed: not connected to server") ErrServerAckTimeout = errors.New("waiting for server message ack timed out") ErrNoMessageConfirmation = errors.New("server did not confirm message receipt") )
Functions ¶
This section is empty.
Types ¶
type ConnectionManager ¶
type ConnectionManager struct {
// contains filtered or unexported fields
}
func NewConnectionManager ¶
func NewConnectionManager(log logr.Logger, addr string) (*ConnectionManager, error)
func (*ConnectionManager) Channel ¶
func (m *ConnectionManager) Channel() (*amqp091.Channel, error)
func (*ConnectionManager) Close ¶
func (m *ConnectionManager) Close() error
func (*ConnectionManager) WithChannel ¶
func (m *ConnectionManager) WithChannel(fn func(ch *amqp091.Channel) error) error
func (*ConnectionManager) WithChannelAndConfirmation ¶
func (m *ConnectionManager) WithChannelAndConfirmation(fn func(ch *amqp091.Channel) error) error
type SimpleClient ¶
type SimpleClient struct { Manager *ConnectionManager // contains filtered or unexported fields }
func NewSimpleClient ¶
func NewSimpleClient(log logr.Logger, addr string) (*SimpleClient, error)
func (*SimpleClient) Close ¶
func (c *SimpleClient) Close() error
func (*SimpleClient) Publish ¶
func (c *SimpleClient) Publish(ctx context.Context, msg SimpleMessage) error
Click to show internal directories.
Click to hide internal directories.