Documentation
¶
Index ¶
- func Key(cfg sshclient.ConnConfig) string
- type ConnInfo
- type DialFunc
- type HealthFunc
- type Pool
- func (p *Pool) Close(key string) error
- func (p *Pool) CloseAll() error
- func (p *Pool) Get(ctx context.Context, alias string, cfg sshclient.ConnConfig) (*sshclient.Client, error)
- func (p *Pool) GetWithStatus(ctx context.Context, alias string, cfg sshclient.ConnConfig) (*sshclient.Client, bool, error)
- func (p *Pool) Len() int
- func (p *Pool) Reap() int
- func (p *Pool) Stats() []ConnInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Key ¶
func Key(cfg sshclient.ConnConfig) string
Types ¶
type DialFunc ¶
DialFunc and HealthFunc are the pool's dependency-injection seams. They default to the real implementations in New and let tests drive Get's concurrency behaviour deterministically without a live SSH server — replacing the former package-level mutable globals, which leaked shared state across tests.
type HealthFunc ¶
type Pool ¶
type Pool struct {
DialFunc DialFunc
HealthFunc HealthFunc
// contains filtered or unexported fields
}
func (*Pool) GetWithStatus ¶
Click to show internal directories.
Click to hide internal directories.