Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
CurrentContext string `yaml:"current_context"`
Contexts map[string]*Context `yaml:"contexts"`
// contains filtered or unexported fields
}
func NewFromFile ¶
type Context ¶ added in v0.6.0
type Context struct {
Name string `yaml:"-"`
Connections []MachineConnection `yaml:"connections"`
}
func (*Context) SetDefaultConnection ¶ added in v0.15.0
type MachineConnection ¶
type MachineConnection struct {
SSH SSHDestination `yaml:"ssh,omitempty"`
SSHCLI SSHDestination `yaml:"ssh_cli,omitempty"`
SSHKeyFile string `yaml:"ssh_key_file,omitempty"`
// TCP is the address and port of the machine's API server.
// The pointer is used to omit the field when not set. Otherwise, yaml marshalling includes an empty object.
TCP *netip.AddrPort `yaml:"tcp,omitempty"`
// Unix is the path to the machine's API unix socket.
Unix string `yaml:"unix,omitempty"`
Host string `yaml:"host,omitempty"`
PublicKey secret.Secret `yaml:"public_key,omitempty"`
MachineID string `yaml:"machine_id,omitempty"`
}
func (*MachineConnection) String ¶ added in v0.12.2
func (c *MachineConnection) String() string
func (*MachineConnection) Validate ¶ added in v0.14.0
func (c *MachineConnection) Validate() error
type SSHDestination ¶
type SSHDestination string
SSHDestination represents an SSH destination string in the canonical form of "user@host:port". Empty user or port components are omitted.
func NewSSHDestination ¶
func NewSSHDestination(user, host string, port int) SSHDestination
NewSSHDestination constructs an SSHDestination from user, host, and port components. If user is empty, it is omitted. If port is 0, it is omitted.
Click to show internal directories.
Click to hide internal directories.