Documentation ¶
Index ¶
Constants ¶
const HandlerEnvFileName = "HandlerEnvironment.json"
HandlerEnvFileName is the file name of the Handler Environment as placed by the Azure Linux Guest Agent.
Variables ¶
This section is empty.
Functions ¶
func FindSeqNum ¶
FindSeqnum finds the file with the highest number under configFolder named like 0.settings, 1.settings so on.
func ReadSettings ¶
ReadSettings locates the .settings file and returns public settings JSON, and protected settings JSON (by decrypting it with the keys in configFolder).
func UnmarshalHandlerSettings ¶
func UnmarshalHandlerSettings(publicSettings, protectedSettings map[string]interface{}, publicV, protectedV interface{}) error
UnmarshalHandlerSettings unmarshals given publicSettings/protectedSettings types assumed underlying values are JSON into references publicV/protectedV respectively (of struct types that contain structured fields for settings).
Types ¶
type HandlerEnvironment ¶
type HandlerEnvironment struct { Version float64 `json:"version"` Name string `json:"name"` HandlerEnvironment struct { HeartbeatFile string `json:"heartbeatFile"` StatusFolder string `json:"statusFolder"` ConfigFolder string `json:"configFolder"` LogFolder string `json:"logFolder"` } }
HandlerEnvironment describes the handler environment configuration presented to the extension handler by the Azure Linux Guest Agent.
func GetHandlerEnv ¶
func GetHandlerEnv() (he HandlerEnvironment, _ error)
GetHandlerEnv locates the HandlerEnvironment.json file by assuming it lives next to or one level above the extension handler (read: this) executable, reads, parses and returns it.
func ParseHandlerEnv ¶
func ParseHandlerEnv(b []byte) (he HandlerEnvironment, _ error)
ParseHandlerEnv parses the /var/lib/waagent/[extension]/HandlerEnvironment.json format.