Documentation ¶
Index ¶
- Constants
- Variables
- func GetCmd(c *cli.Context) (cmd string)
- func GetHostList(hostsArg, prefer string) (list hostlist.HostInfoList, err error)
- func Init()
- func PrepareExecutor(c *cli.Context) *executor.Executor
- func Run() error
- func SetupFormatter(c *cli.Context, exe *executor.Executor) (err error)
- func SetupParameter(c *cli.Context) executor.Parameter
Constants ¶
View Source
const ( PIPEEMTPY = "" PIPEUSEDBYHOSTLIST = "_PIPE_USED_BY_HOSTLIST" PIPEUSEDBYCMD = "_PIPE_USED_BY_CMD" )
Input From Pipe/HereDoc
Variables ¶
View Source
var AccountFlag = cli.StringFlag{
Name: "account",
Usage: "Some Executors need an Account to initiate",
EnvVar: "ACCOUNT",
}
AccountFlag `--account`
View Source
var ConcurrencyFlag = cli.IntFlag{
Name: "concurrency, c",
Value: 1,
Usage: "Concurrency",
EnvVar: "CONCURRENCY",
}
ConcurrencyFlag `-c`
View Source
var HostsFlag = cli.StringFlag{
Name: "hosts, f",
Usage: "Hostname List",
}
HostsFlag `-f`
View Source
var JSONFlag = cli.BoolFlag{
Name: "json, j",
Usage: "Prints in JSON",
}
JSONFlag `-j`
View Source
var MethodFlag = cli.StringFlag{
Name: "method, m",
Value: "ssh",
EnvVar: "METHOD",
Usage: "How to execute the commands",
}
MethodFlag `-m`
View Source
var PasswdFlag = cli.BoolFlag{
Name: "passwd, p",
Usage: "Add Password Authentication Method",
}
PasswdFlag `-p`
View Source
var PasswordFlag = cli.StringFlag{
Name: "password",
EnvVar: "PASSWORD",
Usage: "Specify password in Command Line",
}
PasswordFlag `--password`
View Source
var PreferFlag = cli.StringFlag{
Name: "prefer",
EnvVar: "PREFER",
Usage: "Override default hostlist lookup chain",
}
PreferFlag `--prefer`
View Source
var RetryFlag = cli.IntFlag{
Name: "retry",
Usage: "Retry",
Value: 0,
}
RetryFlag `--retry`
View Source
var TimeoutFlag = cli.IntFlag{
Name: "timeout, t",
Usage: "Timeout. Unit: s",
Value: 0,
}
TimeoutFlag `-t`
View Source
var UserFlag = cli.StringFlag{
Name: "user, u",
Usage: "Username",
EnvVar: "USER,USER",
}
UserFlag `-u`
View Source
var WindowFlag = cli.BoolFlag{
Name: "window, w",
Usage: "Vim-like Command-Line User Interface",
}
WindowFlag `-w`
Functions ¶
func GetHostList ¶
func GetHostList(hostsArg, prefer string) (list hostlist.HostInfoList, err error)
GetHostList gets hostlist from flag/pipe
@hostsArg: argument for hostlist to generate HostInfoList @prefer: preferred method to get hostlist(PreferFlag)
func PrepareExecutor ¶
PrepareExecutor fills Executor
func SetupFormatter ¶
SetupFormatter *MUST* be called after hostlist is ready
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.