mqpool

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2018 License: GPL-3.0 Imports: 6 Imported by: 0

README

mqpool

mqpool is the connection pool of amqp

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConnectionString = errors.New("incorrect connection string")
	ErrParameterLength  = errors.New("incorrect parameter length")
	ErrConfig           = errors.New("incorrect config type")
)
View Source
var (
	ErrClosed = errors.New("pool is closed")
)

Functions

This section is empty.

Types

type Conn

type Conn struct {
	*amqp.Connection
	// contains filtered or unexported fields
}

func (*Conn) Close

func (p *Conn) Close() error

func (*Conn) MarkUnusable

func (p *Conn) MarkUnusable()

type Connection

type Connection interface {
	Close() error
}

type Factory

type Factory func() (*amqp.Connection, error)

type Pool

type Pool interface {
	Get() (*Conn, error)
	Close()
	Len() int
}

func NewConnPool

func NewConnPool(initialCap, maxCap int, args ...interface{}) (Pool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL