Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { *instr.Instrumentation MessageTTL time.Duration // contains filtered or unexported fields }
Channel wraps an AMQP channel
type Config ¶
type Config struct { URL string MaxReconnect int ReconnectTime time.Duration MessageTTL time.Duration }
Config specifies the configuration for an AMQP queue.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig generates a default configuration for an AMQP queue.
type Connection ¶
type Connection struct { *instr.Instrumentation // contains filtered or unexported fields }
Connection wraps an AMQP connection
func NewConnection ¶
func NewConnection(ctx context.Context, cfg *Config, amqpConfig *amqp.Config, i *instr.Instrumentation) (*Connection, error)
NewConnection returns new AMQP connection
func (*Connection) NewChannelQueue ¶
func (c *Connection) NewChannelQueue(ctx context.Context, name string, prefetchCount int) (*Queue, error)
NewChannelQueue returns a new queue on a new channel
func (*Connection) String ¶
func (c *Connection) String() string
type PublisherFactory ¶
type PublisherFactory struct { *Config AMQPConfig *amqp.Config Queue string *instr.Instrumentation }
PublisherFactory automates creation of AMQP Publishers.
func (PublisherFactory) NewPublisher ¶
NewPublisher generates a new publisher or returns an error.
type Queue ¶
type Queue struct { *instr.Instrumentation // contains filtered or unexported fields }
Queue wraps an channel/queue for tasks
Click to show internal directories.
Click to hide internal directories.