Documentation
¶
Index ¶
- func Deploy(deploys []DeployConfig, isPrompt bool) error
- func InitAuth(deploys []DeployConfig) (map[string]HostAuth, error)
- func InitHost(user, ip string, auth ssh.AuthMethod) error
- func PromptAuth(ip *string) ssh.AuthMethod
- func Remove(deploys []DeployConfig, isPrompt bool) error
- type DeployConfig
- type HostAuth
- type HostConfig
- type NodeConfig
- type RawConfig
- type SSHClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deploy ¶
func Deploy(deploys []DeployConfig, isPrompt bool) error
Deploy deploys nodes to hosts as specified in `config`
func InitAuth ¶
func InitAuth(deploys []DeployConfig) (map[string]HostAuth, error)
InitAuth creates a mapping of host names to SSH authentications Requires user input at terminal
func InitHost ¶
func InitHost(user, ip string, auth ssh.AuthMethod) error
InitHost initializes a host environment to be able to run nodes.
func PromptAuth ¶
func PromptAuth(ip *string) ssh.AuthMethod
PromptAuth returns an `ssh.AuthMethod` object for establishing an `SSHClient` Requires user input at terminal
func Remove ¶
func Remove(deploys []DeployConfig, isPrompt bool) error
Remove removes nodes from hosts as specified in `config`
Types ¶
type DeployConfig ¶
type DeployConfig struct {
User, IP string
Nodes []NodeConfig
}
DeployConfig is a deploy instruction for a particular host
func InitConfig ¶
func InitConfig(cfgpath string) ([]DeployConfig, error)
InitConfig returns a network configuration from `cfgpath`
type HostAuth ¶
type HostAuth struct {
User, IP string
Auth ssh.AuthMethod
}
HostAuth represents a full set of host SSH credentials
type NodeConfig ¶
NodeConfig is a node configuration
type RawConfig ¶
type RawConfig struct { Hosts []struct { Name, User, IP string } Nodes []struct { Class string Flags node.FlagsYAML } Deploys []struct { Host string Nodes []struct { Name, Class string Flags node.FlagsYAML } } }
RawConfig is a raw network configuration
type SSHClient ¶
SSHClient implements an SSH client
func NewSSH ¶
func NewSSH(user, ip string, auth ssh.AuthMethod) (*SSHClient, error)
NewSSH instantiates a new SSH client
func (*SSHClient) RemovePath ¶
RemovePath removes file or directory `path` through client