Documentation ¶
Index ¶
- type Client
- type DefaultClient
- func (client DefaultClient) GetInstanceIdentityDocument() (meta Metadata, err error)
- func (client DefaultClient) GetMetadata(path string) (string, error)
- func (client DefaultClient) GetUserData() (string, error)
- func (client DefaultClient) GetVendorData() (string, error)
- func (client DefaultClient) SendRequest(path string) (string, error)
- func (client *DefaultClient) SetHttpClient(httpClient http.Client) error
- type MDDisks
- type MDEthernet
- type MDIPs
- type MDMatch
- type MDNameServers
- type MDNetworkConfig
- type MDNetworkInterfaces
- type MDUHost
- type Metadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type DefaultClient ¶
type DefaultClient struct {
// contains filtered or unexported fields
}
func (DefaultClient) GetInstanceIdentityDocument ¶
func (client DefaultClient) GetInstanceIdentityDocument() (meta Metadata, err error)
func (DefaultClient) GetMetadata ¶
func (client DefaultClient) GetMetadata(path string) (string, error)
func (DefaultClient) GetUserData ¶
func (client DefaultClient) GetUserData() (string, error)
func (DefaultClient) GetVendorData ¶
func (client DefaultClient) GetVendorData() (string, error)
func (DefaultClient) SendRequest ¶
func (client DefaultClient) SendRequest(path string) (string, error)
func (*DefaultClient) SetHttpClient ¶
func (client *DefaultClient) SetHttpClient(httpClient http.Client) error
SetHttpClient will setup a http client
type MDEthernet ¶
type MDEthernet struct { Addresses []string `json:"addresses"` Gateway4 string `json:"gateway4"` Match MDMatch `json:"match"` MTU int `json:"mtu"` NameServers MDNameServers `json:"nameservers"` }
type MDNameServers ¶
type MDNameServers struct {
Addresses []string `json:"addresses"`
}
type MDNetworkConfig ¶
type MDNetworkConfig struct { Ethernets map[string]MDEthernet `json:"ethernets"` Version int `json:"version"` }
type MDNetworkInterfaces ¶
type MDUHost ¶
type MDUHost struct { CPU int `json:"cpu"` Disks []MDDisks `json:"disks"` GPU int `json:"gpu"` Hotplug bool `json:"hotplug"` ImageId string `json:"image-id"` IsolationGroup string `json:"isolation-group"` MachineType string `json:"machine-type"` Memory int `json:"memory"` Name string `json:"name"` NetCapability string `json:"net-capability"` NetworkInterfaces []MDNetworkInterfaces `json:"network-interfaces"` OsName string `json:"os-name"` ProjectId string `json:"project-id"` Region string `json:"region"` Remark string `json:"remark"` Tag string `json:"tag"` UHostId string `json:"uhost-id"` Zone string `json:"zone"` }
type Metadata ¶
type Metadata struct { AvailabilityZone string `json:"availability-zone"` CloudName string `json:"cloud-name"` InstanceId string `json:"instance-id"` LocalHostname string `json:"local-hostname"` NetworkConfig MDNetworkConfig `json:"network-config"` Platform string `json:"platform"` PublicSSHKeys []string `json:"public-ssh-keys"` Region string `json:"region"` UHost MDUHost `json:"uhost"` }
Click to show internal directories.
Click to hide internal directories.