Documentation
¶
Index ¶
- func Client(user, password, addr string) (client *ssh.Client, err error)
- func Command(remote, password, cmd string) (output string, err error)
- func CommandSession(session *ssh.Session, cmd string) (output string, err error)
- func Scp(local, remote, password string, fn func(current, total int64)) (err error)
- func ScpReader(client *sftp.Client, filename string, reader io.Reader) (err error)
- func Session(user, password, addr string) (client *ssh.Client, session *ssh.Session, err error)
- func SftpClient(user, password, addr string) (client *sftp.Client, err error)
- type Pool
- func (p *Pool) Add(addr, user, password string)
- func (p *Pool) Close() error
- func (p *Pool) Command(remote, password, cmd string) (output string, err error)
- func (p *Pool) Init(remote ...Remote)
- func (p *Pool) Scp(local, remote, password string, fn func(current, total int64)) (err error)
- func (p *Pool) ScpReader(reader io.Reader, remote, password string, fn func(size int)) (err error)
- func (p *Pool) Session(addr, user, password string) (session *ssh.Session, err error)
- func (p *Pool) SftpClient(addr, user, password string) (client *sftp.Client, err error)
- type Pool2
- func (p *Pool2) Command(remote, password, cmd string) (output string, err error)
- func (p *Pool2) Scp(local, remote, password string, fn func(current, total int64)) (err error)
- func (p *Pool2) ScpReader(reader io.Reader, remote, password string, fn func(size int)) (err error)
- func (p *Pool2) Session(addr, username, password string) (session *ssh.Session, err error)
- func (p *Pool2) SftpClient(addr, username, password string) (*sftp.Client, error)
- type PoolOption
- type Remote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandSession ¶
会话执行命令
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
type Pool2 ¶
type Pool2 struct {
// contains filtered or unexported fields
}
type PoolOption ¶
Click to show internal directories.
Click to hide internal directories.