Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONPretty ¶
func JSONPretty(data interface{}) string
JSONPretty prettify the JSON encoding of data silently
func JSONPrettyE ¶
JSONPrettyE prettify the JSON encoding of data
Types ¶
type Cmd ¶
type Cmd interface { // Parse parses the command. Parse() // ExecInHosts execute in specified hosts. ExecInHosts(gs *GoSSH) error }
Cmd means the executable interface
type CmdGroup ¶
type CmdGroup struct { Type cmdtype.CmdType Cmds []Cmd Results []CmdExcResult // contains filtered or unexported fields }
CmdGroup represents the a group of structure of command line with same cmd type in config's cmds.
type GoSSH ¶
type GoSSH struct { Vars Vars Hosts []*Host HostsMap map[string]*Host CmdGroups []CmdGroup // contains filtered or unexported fields }
GoSSH defines the structure of the whole cfg context.
type Host ¶
type Host struct { Name string Addr string User string Password string // empty when using public key Properties Vars }
Host represents the structure of remote host information for ssh.
type LocalCmd ¶
type LocalCmd struct {
// contains filtered or unexported fields
}
LocalCmd means local commands.
func (*LocalCmd) ExecInHosts ¶
ExecInHosts execute in specified hosts.
type SCPCmd ¶
type SCPCmd struct {
// contains filtered or unexported fields
}
SCPCmd means commands for scp.
func (*SCPCmd) ExecInHosts ¶
ExecInHosts execute in specified hosts.
type SSHCmd ¶
type SSHCmd struct {
// contains filtered or unexported fields
}
SSHCmd means SSH command.
func (SSHCmd) ExecInHosts ¶
ExecInHosts execute in specified hosts.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.