Documentation
¶
Overview ¶
Package cloudinit implements write_files and runcmd directives of cloudinit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWriter ¶
type FileWriter struct { }
func (FileWriter) MkdirIfNotExists ¶
func (w FileWriter) MkdirIfNotExists(dirName string) error
MkdirIfNotExists creates the directory if it does not exist already
func (FileWriter) WriteToFile ¶
func (w FileWriter) WriteToFile(file *Files) error
WriteToFile writes contents to file with appropriate permissions as provided in the write_files directive of cloud-config file
type ICmdRunner ¶
type IFileWriter ¶
type ITemplateParser ¶
type ScriptExecutor ¶
type ScriptExecutor struct { WriteFilesExecutor IFileWriter RunCmdExecutor ICmdRunner ParseTemplateExecutor ITemplateParser }
func (ScriptExecutor) Execute ¶
func (se ScriptExecutor) Execute(bootstrapScript string) error
Execute performs the following operations on the bootstrap script
- parse the script to get the cloudinit data
- execute the write_files directive
- execute the run_cmd directive
type TemplateParser ¶
type TemplateParser struct {
Template interface{}
}
func (TemplateParser) ParseTemplate ¶
func (tp TemplateParser) ParseTemplate(templateContent string) (string, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.