Documentation ¶
Index ¶
- Constants
- Variables
- func AddHost(name string, user string, ip string, port uint16, jump string, tags string, ...) error
- func CheckTags(tags string) error
- func DeleteHost(name string) error
- func GetHostNames() (names []string)
- func ListConfigHosts(name string, user string, tags string) error
- func LoadConfig() error
- func UpdateHost(name string, user string, ip string, port uint16, jump string, tags string, ...) error
- type ConfigType
- type Host
Constants ¶
View Source
const (
HOST_LIST_HEADERS = "NAME\tHOST\tUSER\tPORT\tJUMP\tTAGS\tTIMEOUT\t"
)
Variables ¶
View Source
var Config = &ConfigType{Parallel: 1, OverlayTimeout: -1}
Functions ¶
func DeleteHost ¶
func GetHostNames ¶
func GetHostNames() (names []string)
func LoadConfig ¶ added in v1.0.1
func LoadConfig() error
Types ¶
type ConfigType ¶
type ConfigType struct { ModulesDir string `yaml:"modulesDir,omitempty"` SSHAuthSock string `yaml:"sshAuthSock,omitempty"` DefaultTimeout int `yaml:"defaultTimeout,omitempty"` DefaultUser string `yaml:"defaultUser,omitempty"` DefaultPort uint16 `yaml:"defaultPort,omitempty"` DefaultJump string `yaml:"defaultJump,omitempty"` Hosts map[string]*Host `yaml:"hosts"` Parallel int `yaml:"-"` OverlayTimeout int `yaml:"-"` OverlayUser string `yaml:"-"` OverlayPort uint16 `yaml:"-"` OverlayJump string `yaml:"-"` OverlayHost string `yaml:"-"` JumpHosts []*Host `yaml:"-"` }
type Host ¶
type Host struct { Addr string `yaml:"addr"` Jump string `yaml:"jump,omitempty"` Tags string `yaml:"tags,omitempty"` Timeout int `yaml:"timeout,omitempty"` Name string `yaml:"-"` User string `yaml:"-"` Host string `yaml:"-"` Port uint16 `yaml:"-"` TagList []string `yaml:"-"` JumpList []*Host `yaml:"-"` }
func ConfigHostsFilter ¶
func (*Host) JumpString ¶
func (*Host) SetDefaultValue ¶ added in v1.0.1
func (host *Host) SetDefaultValue()
func (*Host) SetOverlayValue ¶ added in v1.0.1
func (host *Host) SetOverlayValue()
func (*Host) TagsFormat ¶ added in v1.0.1
func (host *Host) TagsFormat()
Click to show internal directories.
Click to hide internal directories.