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 MDUPHost
- type MDUPHostDisk
- 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 MDUPHost ¶ added in v0.21.14
type MDUPHost struct {
CPU int64 `json:"cpu"`
Disks []MDUPHostDisk `json:"disks"`
Memory int64 `json:"memory"`
Name string `json:"name"`
NetworkInterfaces []MDNetworkInterfaces `json:"network-interfaces"`
OSName string `json:"os-name"`
PHostId string `json:"phost-id"`
PHostType string `json:"phost-type"`
ProjectId string `json:"project-id"`
Region string `json:"region"`
Remark string `json:"remark"`
Tag string `json:"tag"`
Zone string `json:"zone"`
}
type MDUPHostDisk ¶ added in v0.21.14
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"`
UPHost MDUPHost `json:"uphost"`
}
Click to show internal directories.
Click to hide internal directories.