Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container contains connection and related info
type IConnectionProvider ¶
type IConnectionProvider interface {
NewConnection(string, string, string, *gologger.CustomLogger) (*amqp.Connection, error)
}
IConnectionProvider defines the interface to be implemented by a connection provider.
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool represents a pool of connections
func NewConnectionPool ¶
func NewConnectionPool(serverList *[]string, username string, password string, connectionProvider IConnectionProvider, logger *gologger.CustomLogger) *Pool
NewConnectionPool returns new connection pool, waits for 3 seconds before returning
func (*Pool) GetConnection ¶
func (pool *Pool) GetConnection() (*amqp.Connection, error)
GetConnection provides a rabbitmq connection from connection pool, times out in 1 minute if unable to get a connection
Click to show internal directories.
Click to hide internal directories.