github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/cloudconfig/providerinit/renderers/interface.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Copyright 2015 Cloudbase Solutions SRL 3 // Licensed under the AGPLv3, see LICENCE file for details. 4 5 // The renderers package implements a way to encode the userdata 6 // depending on the OS and the provider. 7 // It currently holds an interface and common functions, while 8 // the implementations live in the particular providers. 9 package renderers 10 11 import ( 12 "github.com/juju/os" 13 14 "github.com/juju/juju/cloudconfig/cloudinit" 15 ) 16 17 // ProviderRenderer defines a method to encode userdata depending on 18 // the OS and the provider. 19 // In the future this might support another method for rendering 20 // the userdata differently(bash vs yaml) since some providers might 21 // not ship cloudinit on every OS 22 type ProviderRenderer interface { 23 Render(cloudinit.CloudConfig, os.OSType) ([]byte, error) 24 }