Documentation ¶
Index ¶
- type Connection
- func (this *Connection) Close()
- func (this *Connection) Consume(qname string, resource string, worker ConsumerFunc) (err error)
- func (this *Connection) Init(url string, resources []string, reconnectTimeout time.Duration, ...) (err error)
- func (this *Connection) Publish(resource string, payload []byte) error
- func (this *Connection) SetMessageLogging(logging bool)
- func (this *Connection) UseChannel(worker func(channel *amqp.Channel)) (err error)
- type ConsumerFunc
- type ConsumerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func Init ¶
func Init(url string, resources []string, reconnectTimeout int64) (result *Connection, err error)
func (*Connection) Close ¶
func (this *Connection) Close()
func (*Connection) Consume ¶
func (this *Connection) Consume(qname string, resource string, worker ConsumerFunc) (err error)
func (*Connection) Init ¶
func (this *Connection) Init(url string, resources []string, reconnectTimeout time.Duration, consumer map[string]ConsumerInfo) (err error)
func (*Connection) SetMessageLogging ¶
func (this *Connection) SetMessageLogging(logging bool)
func (*Connection) UseChannel ¶
func (this *Connection) UseChannel(worker func(channel *amqp.Channel)) (err error)
locks channel to worker to safely reinitiate it if channel closing error occurs
type ConsumerFunc ¶
type ConsumerInfo ¶
type ConsumerInfo struct { Worker ConsumerFunc QName string Resource string }
Click to show internal directories.
Click to hide internal directories.