Documentation ¶
Index ¶
Constants ¶
View Source
const DEFAULT_TIMEOUT = 3 * time.Minute
Variables ¶
View Source
var (
ErrNotValid = errors.New("SSHClient not valid")
)
Functions ¶
This section is empty.
Types ¶
type SSHClient ¶
type SSHClient struct { Addr string User string KeyFile string // contains filtered or unexported fields }
func NewSSHClient ¶
type SSHClientPool ¶
type SSHClientPool struct { URL string Key string MaxConns int // contains filtered or unexported fields }
ssh 连接池
func NewSSHClientPool ¶
func NewSSHClientPool(url, key string, maxConns int) (pool *SSHClientPool, err error)
func (*SSHClientPool) Dial ¶
func (pool *SSHClientPool) Dial(n, addr string) (c net.Conn, err error)
func (*SSHClientPool) Shutdown ¶
func (pool *SSHClientPool) Shutdown()
Click to show internal directories.
Click to hide internal directories.