Documentation ¶
Index ¶
- Variables
- func CreateSession(host *Host) (*ssh.Client, *ssh.Session, error)
- func LoadDefaultKeyFiles() ([]ssh.Signer, error)
- func LoadKeyFile(path string) (ssh.Signer, error)
- func OutputLocal(message string)
- func OutputRemote(host *Host, message string)
- func SilenceOutput(beQuiet bool)
- func WrapSudoCommand(cmd string) string
- type ClientConfig
- func (config *ClientConfig) Local(cmd string) CmdResult
- func (config *ClientConfig) LocalWithOpts(cmd string, options CmdOptions) CmdResult
- func (config *ClientConfig) Put(source string, destination string)
- func (config *ClientConfig) Run(cmd string) CmdResult
- func (config *ClientConfig) RunWithOpts(cmd string, options CmdOptions) CmdResult
- type CmdOptions
- type CmdResult
- type Host
Constants ¶
This section is empty.
Variables ¶
View Source
var (
HideCommandOutput bool = false
)
Functions ¶
func LoadDefaultKeyFiles ¶
func OutputLocal ¶
func OutputLocal(message string)
func OutputRemote ¶
func SilenceOutput ¶
func SilenceOutput(beQuiet bool)
func WrapSudoCommand ¶
Types ¶
type ClientConfig ¶
type ClientConfig struct { Hosts []*Host CurrentDirectory string // contains filtered or unexported fields }
func NewClient ¶
func NewClient(hosts []*Host) *ClientConfig
func NewLocalClient ¶
func NewLocalClient() *ClientConfig
func (*ClientConfig) Local ¶
func (config *ClientConfig) Local(cmd string) CmdResult
run a local command
func (*ClientConfig) LocalWithOpts ¶
func (config *ClientConfig) LocalWithOpts(cmd string, options CmdOptions) CmdResult
func (*ClientConfig) Put ¶
func (config *ClientConfig) Put(source string, destination string)
func (*ClientConfig) Run ¶
func (config *ClientConfig) Run(cmd string) CmdResult
run a command on the remote hosts
func (*ClientConfig) RunWithOpts ¶
func (config *ClientConfig) RunWithOpts(cmd string, options CmdOptions) CmdResult
type CmdOptions ¶
Click to show internal directories.
Click to hide internal directories.