renderers

package
v0.0.0-...-a002913 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2015 License: AGPL-3.0 Imports: 5 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPowershellTags

func AddPowershellTags(udata []byte) []byte

AddPowershellTags adds <powershell>...</powershell> to it's input

func ToBase64

func ToBase64(data []byte) []byte

ToBase64 just transforms whatever userdata it gets to base64 format

func WinEmbedInScript

func WinEmbedInScript(udata []byte) []byte

WinEmbedInScript for now is used on windows and it returns a powershell script which has the userdata embedded as base64(gzip(userdata))

Types

type ProviderRenderer

type ProviderRenderer interface {

	// EncodeUserdata takes a []byte and encodes it in the right format.
	// The implementations are based on the different providers and OSTypes.
	EncodeUserdata([]byte, os.OSType) ([]byte, error)
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL