Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Name string `yaml:"name"` // Command name.
Desc string `yaml:"desc"` // Command description.
Run *string `yaml:"run"` // Command(s) to be run remotelly.
Script *string `yaml:"script"` // Load command(s) from script and run it remotelly.
Upload []*Upload `yaml:"upload"` // See Upload struct.
Stdin bool `yaml:"stdin"` // Attach localhost STDOUT to remote commands' STDIN?
Input io.ReadCloser `yaml:"-"`
Timeout int `yaml:"timeout"`
}
Command represents command(s) to be run remotely.
type Commands ¶
type Commands struct {
Names []string
// contains filtered or unexported fields
}
Commands is a list of user-defined commands
func (*Commands) UnmarshalYAML ¶
type EnvList ¶
type EnvList []*EnvVar
EnvList is a list of environment variables that maps to a YAML map, but maintains order, enabling late variables to reference early variables.
func (*EnvList) ResolveValues ¶
func (*EnvList) UnmarshalYAML ¶
type EnvVar ¶
EnvVar represents an environment variable
type ErrMustUpdate ¶
type ErrMustUpdate struct {
Msg string
}
func (ErrMustUpdate) Error ¶
func (e ErrMustUpdate) Error() string
type ErrUnsupportedSupfileVersion ¶
type ErrUnsupportedSupfileVersion struct {
Msg string
}
func (ErrUnsupportedSupfileVersion) Error ¶
func (e ErrUnsupportedSupfileVersion) Error() string
type Network ¶
type Network struct {
Env EnvList `yaml:"env"`
Inventory string `yaml:"inventory"`
// Hosts []string `yaml:"hosts"`
Remotes []*structs.L2DeviceRemoteInfo `yaml:"remotes"`
Bastion string `yaml:"bastion"` // Jump host for the environment
// Should these live on Hosts too? We'd have to change []string to struct, even in Supfile.
User string // `yaml:"user"`
IdentityFile string // `yaml:"identity_file"`
}
Network is group of hosts with extra custom env vars.
func (Network) ParseInventory ¶
ParseInventory runs the inventory command, if provided, and appends the command's output lines to the manually defined list of hosts.
type Networks ¶
type Networks struct {
Names []string
// contains filtered or unexported fields
}
Networks is a list of user-defined networks
func (*Networks) UnmarshalYAML ¶
type SupConfig ¶
type SupConfig struct {
// Network Network `yaml:"network"`
Commands []*Command `yaml:"commands"`
Targets Targets `yaml:"targets"`
Env *EnvList `yaml:"env"`
Version string `yaml:"version"`
}
func NewSupConfg ¶
func (*SupConfig) RunCommand ¶
func (*SupConfig) ScriptCommand ¶
type Supfile ¶
type Supfile struct {
Networks Networks `yaml:"networks"`
Commands Commands `yaml:"commands"`
Targets Targets `yaml:"targets"`
Env *EnvList `yaml:"env"`
Version string `yaml:"version"`
}
Supfile represents the Stack Up configuration YAML file.
func NewSupfile ¶
NewSupfile parses configuration file and returns Supfile or error.
type Targets ¶
type Targets struct {
Names []string
// contains filtered or unexported fields
}
Targets is a list of user-defined targets