Documentation
¶
Overview ¶
The renderers package implements a way to encode the userdata depending on the OS and the provider. It currently holds an interface and common functions, while the implementations live in the particular providers.
Index ¶
- func AddPowershellTags(udata []byte) []byte
- func RenderScript(cfg cloudinit.RenderConfig, ds ...Decorator) ([]byte, error)
- func RenderYAML(cfg cloudinit.RenderConfig, ds ...Decorator) ([]byte, error)
- func ToBase64(data []byte) []byte
- func WinEmbedInScript(udata []byte) []byte
- type Decorator
- type ProviderRenderer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPowershellTags ¶
AddPowershellTags adds <powershell>...</powershell> to it's input
func RenderScript ¶
func RenderScript(cfg cloudinit.RenderConfig, ds ...Decorator) ([]byte, error)
RenderScript renders the given cloud-config as a script, and then passes the script through the given decorators.
func RenderYAML ¶
func RenderYAML(cfg cloudinit.RenderConfig, ds ...Decorator) ([]byte, error)
RenderYAML renders the given cloud-config as YAML, and then passes the YAML through the given decorators.
func ToBase64 ¶
ToBase64 just transforms whatever userdata it gets to base64 format
Types ¶
type Decorator ¶
Decorator is a function that can be used as part of a rendering pipeline.
type ProviderRenderer ¶
ProviderRenderer defines a method to encode userdata depending on the OS and the provider. In the future this might support another method for rendering the userdata differently(bash vs yaml) since some providers might not ship cloudinit on every OS
Source Files
¶
- common.go
- interface.go