Versions in this module Expand all Collapse all v0 v0.1.0 Aug 27, 2021 Changes in this version + const DefaultExpireAfter + var PoolExhausted = errors.New("client pool exhausted") + func DialArgsID(net, addr string, conf *ssh.ClientConfig) string + type ClaimOption func(*claimOptions) + func WithClientFactory(f NewSSHClientFunc) ClaimOption + func WithDialArgs(net, addr string, conf *ssh.ClientConfig) ClaimOption + func WithID(id string) ClaimOption + func WithSessPoolOption(opts ...sesspool.Option) ClaimOption + type ClientPool struct + func New(opts ...Option) *ClientPool + func (p *ClientPool) ClaimSession(ctx context.Context, opts ...ClaimOption) (*Session, error) + func (p *ClientPool) Close() error + func (p *ClientPool) Exhausted() bool + func (p *ClientPool) HasID(id string) bool + func (p *ClientPool) NumSessionsForID(id string) int + func (p *ClientPool) PoolStats() map[string]int + func (p *ClientPool) TryClaimSession(ctx context.Context, opts ...ClaimOption) (*Session, error) + type NewSSHClientFunc func(ctx context.Context) (*ssh.Client, error) + type Option func(*ClientPool) + func WithExpireAfter(d time.Duration) Option + func WithPoolSize(max int) Option + type Session struct + func (s *Session) InvalidateClient() error