Documentation
¶
Index ¶
- Variables
- type Conn
- func (c *Conn) Add(addRequest *ldap.AddRequest) error
- func (c *Conn) Bind(username, password string) error
- func (c *Conn) Close()
- func (c *Conn) Compare(dn, attribute, value string) (bool, error)
- func (c *Conn) Del(delRequest *ldap.DelRequest) error
- func (c *Conn) Modify(modifyRequest *ldap.ModifyRequest) error
- func (c *Conn) ModifyDN(modifyDnRequest *ldap.ModifyDNRequest) error
- func (c *Conn) PasswordModify(passwordModifyRequest *ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error)
- func (c *Conn) Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error)
- func (c *Conn) SearchWithPaging(searchRequest *ldap.SearchRequest, pagingSize uint32) (*ldap.SearchResult, error)
- func (c *Conn) SimpleBind(simpleBindRequest *ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error)
- func (c *Conn) Start()
- func (c *Conn) StartTLS(config *tls.Config) error
- type ConnectionFactory
- type Pool
- type ResetFunc
Constants ¶
This section is empty.
Variables ¶
var ( // ErrClosed is returned when the pool was closed ErrClosed = errors.New("pool closed") )
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn implements Client to override the Close() method
func (*Conn) Add ¶
func (c *Conn) Add(addRequest *ldap.AddRequest) error
Add wraps the Add LDAP client method
func (*Conn) Close ¶
func (c *Conn) Close()
Close puts the connection back to the pool instead of closing it
func (*Conn) Del ¶
func (c *Conn) Del(delRequest *ldap.DelRequest) error
Del wraps the Del LDAP client method
func (*Conn) Modify ¶
func (c *Conn) Modify(modifyRequest *ldap.ModifyRequest) error
Modify wraps the Modify LDAP client method
func (*Conn) ModifyDN ¶
func (c *Conn) ModifyDN(modifyDnRequest *ldap.ModifyDNRequest) error
ModifyDN wraps the ModifyDN LDAP client method
func (*Conn) PasswordModify ¶
func (c *Conn) PasswordModify(passwordModifyRequest *ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error)
PasswordModify wraps the PasswordModify LDAP client method
func (*Conn) Search ¶
func (c *Conn) Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error)
Search wraps the Search LDAP client method
func (*Conn) SearchWithPaging ¶
func (c *Conn) SearchWithPaging(searchRequest *ldap.SearchRequest, pagingSize uint32) (*ldap.SearchResult, error)
SearchWithPaging wraps the SearchWithPaging LDAP client method
func (*Conn) SimpleBind ¶
func (c *Conn) SimpleBind(simpleBindRequest *ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error)
SimpleBind wraps the SimpleBind LDAP client method
type ConnectionFactory ¶
ConnectionFactory is a function to create new connections.
type Pool ¶
type Pool interface {
// Get returns a new connection from the pool. Closing the connections puts
// it back to the Pool. Closing it when the pool is destroyed or full will
// be counted as an error.
Get() (*Conn, error)
// NewConnection returns a new LDAP connection not managed by the pool.
NewConnection() (ldap.Client, error)
// Close closes the pool and all its connections.
Close()
// Len returns the current number of connections of the pool.
Len() int
}
Pool is the connection pool interface
func NewChannelPool ¶
func NewChannelPool(capacity, maxCapacity uint, factory ConnectionFactory, reset ResetFunc) (Pool, error)
NewChannelPool creates a new connection pool using a buffered channel