Documentation
¶
Index ¶
- Constants
- type DownloadConfigError
- type DownloadPackageError
- type HostGaCommunicator
- func (*HostGaCommunicator) DownloadConfig(el *logging.ExtensionLogger, appName string, dst string) error
- func (*HostGaCommunicator) DownloadPackage(el *logging.ExtensionLogger, appName string, dst string) error
- func (*HostGaCommunicator) GetVMAppInfo(el *logging.ExtensionLogger, appName string) (*VMAppMetadata, error)
- type HostGaCommunicatorError
- type HostGaCommunicatorGetVMAppInfoError
- type IHostGaCommunicator
- type VMAppMetadata
- type VMAppMetadataReceiver
Constants ¶
const HostGaMetadataErrorPrefix = "HostGaCommunicator GetVMAppInfo error"
const WireProtocolAddress = "AZURE_GUEST_AGENT_WIRE_PROTOCOL_ADDRESS"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadConfigError ¶ added in v1.0.20
type DownloadConfigError struct {
// contains filtered or unexported fields
}
func (*DownloadConfigError) Error ¶ added in v1.0.20
func (e *DownloadConfigError) Error() string
type DownloadPackageError ¶ added in v1.0.20
type DownloadPackageError struct {
// contains filtered or unexported fields
}
func (*DownloadPackageError) Error ¶ added in v1.0.20
func (e *DownloadPackageError) Error() string
type HostGaCommunicator ¶
type HostGaCommunicator struct{}
HostGaCommunicator provides methods for retrieving application metadata and packages from the HostGaPlugin
func (*HostGaCommunicator) DownloadConfig ¶
func (*HostGaCommunicator) DownloadConfig(el *logging.ExtensionLogger, appName string, dst string) error
DownloadConfig downloads the application config through HostGaPlugin to the specified file. If the download fails, it automatically retrieves at the last received bytes and rebuilds the file from downloaded parts
func (*HostGaCommunicator) DownloadPackage ¶
func (*HostGaCommunicator) DownloadPackage(el *logging.ExtensionLogger, appName string, dst string) error
DownloadPackage downloads the application package through HostGaPlugin to the specified file. If the download fails, it automatically retrieves at the last received bytes and rebuilds the file from downloaded parts
func (*HostGaCommunicator) GetVMAppInfo ¶
func (*HostGaCommunicator) GetVMAppInfo(el *logging.ExtensionLogger, appName string) (*VMAppMetadata, error)
GetVMAppInfo returns the metadata for the application
type HostGaCommunicatorError ¶ added in v1.0.20
type HostGaCommunicatorError int
const ( InitializationError HostGaCommunicatorError = iota MetadataRequestFailedWithRetries MetadataRequestFailedInvalidResponseBody DownloadPackageRequestFactoryError DownloadPackageFileError DownloadConfigRequestFactoryError DownloadConfigFileError )
func (HostGaCommunicatorError) ToString ¶ added in v1.0.20
func (hostGaCommunicatorError HostGaCommunicatorError) ToString() string
type HostGaCommunicatorGetVMAppInfoError ¶ added in v1.0.20
type HostGaCommunicatorGetVMAppInfoError struct {
// contains filtered or unexported fields
}
func (*HostGaCommunicatorGetVMAppInfoError) Error ¶ added in v1.0.20
func (e *HostGaCommunicatorGetVMAppInfoError) Error() string
type IHostGaCommunicator ¶
type IHostGaCommunicator interface {
DownloadPackage(el *logging.ExtensionLogger, appName string, dst string) error
DownloadConfig(el *logging.ExtensionLogger, appName string, dst string) error
GetVMAppInfo(el *logging.ExtensionLogger, appName string) (*VMAppMetadata, error)
}
type VMAppMetadata ¶
type VMAppMetadata struct {
ApplicationName string `json:"name"`
Version string `json:"version"`
InstallCommand string `json:"install"`
UpdateCommand string `json:"update"`
RemoveCommand string `json:"remove"`
DirectDownloadOnly bool `json:"directOnly"`
ConfigExists bool
PackageFileName string `json:"packageFileName"`
ConfigFileName string `json:"configFileName"`
RebootBehavior string `json:"scriptBehaviorAfterReboot"`
}
VMAppMetadata contains the format of the metadata returned by HostGAPlugin
type VMAppMetadataReceiver ¶ added in v1.0.18
type VMAppMetadataReceiver struct {
ApplicationName string `json:"name"`
Version string `json:"version"`
InstallCommand string `json:"install"`
UpdateCommand string `json:"update"`
RemoveCommand string `json:"remove"`
DirectDownloadOnly string `json:"directOnly"`
Package string `json:"package"`
Config string `json:"config"`
PackageFileName string `json:"packageFileName"`
ConfigFileName string `json:"configFileName"`
RebootBehavior string `json:"scriptBehaviorAfterReboot"`
}
func (*VMAppMetadataReceiver) MapToVMAppMetadata ¶ added in v1.0.18
func (receiver *VMAppMetadataReceiver) MapToVMAppMetadata() *VMAppMetadata