Documentation
¶
Index ¶
Constants ¶
View Source
const ConnTimeout = 10 * time.Second
Variables ¶
View Source
var ( ErrConsumerCanceledByContextError = fmt.Errorf("consumer canceled by context") ErrConsumerMessageNotInitialized = fmt.Errorf("consumer received empty message") )
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
Connection *amqp.Connection
Channel *amqp.Channel
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(cfg Config) *Connection
func (*Connection) Close ¶
func (l *Connection) Close(ctx context.Context) (done chan struct{})
func (*Connection) Connect ¶
func (l *Connection) Connect(ctx context.Context)
func (*Connection) CreateConsumer ¶
func (l *Connection) CreateConsumer( channelName, consumerName string, handler ConsumerHandler, args amqp.Table) (*Consumer, error)
type ConsumerHandler ¶
type Credentials ¶
type Credentials struct {
Protocol string
Username string
Password string
Addr string
VHost string
Exchange *Exchange
}
func (*Credentials) GetURL ¶
func (c *Credentials) GetURL() string
type EventHandler ¶
type IntrvClient ¶
type IntrvClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(connection *Connection, l *logger.Logger) *IntrvClient
func (*IntrvClient) HandleChannel ¶
func (*IntrvClient) SetDebug ¶
func (c *IntrvClient) SetDebug(debug bool)
func (*IntrvClient) SetHandler ¶
func (c *IntrvClient) SetHandler(eventName string, handler EventHandler)
type Publisher ¶
type Publisher struct {
Connection *Connection
Exchange *Exchange
}
func (*Publisher) Disconnect ¶
Click to show internal directories.
Click to hide internal directories.