Documentation ¶
Index ¶
- Constants
- type CloudConfig
- func (c *CloudConfig) AddCommand(cmd ...string)
- func (c *CloudConfig) AddCommands(cmds ...[]string)
- func (c *CloudConfig) AddFile(f File)
- func (c *CloudConfig) AddPackages(pkgs ...string)
- func (c *CloudConfig) AddScript(p, s string)
- func (c *CloudConfig) AddShellCommand(cmd string)
- func (c *CloudConfig) Encode() (string, error)
- func (c *CloudConfig) RunScript(name, s string)
- type File
Constants ¶
View Source
const (
// Shell defines the used shell
Shell = "/bin/bash"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudConfig ¶
type CloudConfig struct { Commands []interface{} `json:"runcmd"` Packages []string `json:"packages"` WriteFiles []File `json:"write_files"` }
CloudConfig stores informaiton of the cloud config
func DecodeCloudConfig ¶
func DecodeCloudConfig(s string) (*CloudConfig, error)
DecodeCloudConfig decodes the cloud config
func (*CloudConfig) AddCommand ¶
func (c *CloudConfig) AddCommand(cmd ...string)
AddCommand adds a command, which will be run on node start up
func (*CloudConfig) AddCommands ¶
func (c *CloudConfig) AddCommands(cmds ...[]string)
AddCommands adds commands, which will be run on node start up
func (*CloudConfig) AddFile ¶
func (c *CloudConfig) AddFile(f File)
AddFile adds a file, which will be placed on the node
func (*CloudConfig) AddPackages ¶
func (c *CloudConfig) AddPackages(pkgs ...string)
AddPackages adds packages, which should be installed on the node
func (*CloudConfig) AddScript ¶
func (c *CloudConfig) AddScript(p, s string)
AddScript adds a scipt, which will be placed on the node
func (*CloudConfig) AddShellCommand ¶
func (c *CloudConfig) AddShellCommand(cmd string)
AddShellCommand adds a shell comannd, which will be run on node start up
func (*CloudConfig) Encode ¶
func (c *CloudConfig) Encode() (string, error)
Encode encodes the cloud config
func (*CloudConfig) RunScript ¶
func (c *CloudConfig) RunScript(name, s string)
RunScript adds and runs a script on the node
Click to show internal directories.
Click to hide internal directories.