Documentation ¶
Index ¶
- Constants
- type IMetaDataClient
- type MetaData
- func (m *MetaData) DNSNameServers() ([]string, error)
- func (m *MetaData) EIPv4() (string, error)
- func (m *MetaData) HostName() (string, error)
- func (m *MetaData) ImageID() (string, error)
- func (m *MetaData) InstanceID() (string, error)
- func (m *MetaData) Mac() (string, error)
- func (m *MetaData) NTPConfigServers() ([]string, error)
- func (m *MetaData) NetworkType() (string, error)
- func (m *MetaData) OwnerAccountID() (string, error)
- func (m *MetaData) PrivateIPv4() (string, error)
- func (m *MetaData) Region() (string, error)
- func (m *MetaData) SerialNumber() (string, error)
- func (m *MetaData) SourceAddress() (string, error)
- func (m *MetaData) VpcCIDRBlock() (string, error)
- func (m *MetaData) VpcID() (string, error)
- func (m *MetaData) VswitchCIDRBlock() (string, error)
- func (m *MetaData) VswitchID() (string, error)
- type MetaDataClient
- func (vpc *MetaDataClient) Go() (resu []string, err error)
- func (vpc *MetaDataClient) Resource(resource string) IMetaDataClient
- func (vpc *MetaDataClient) ResourceType(rtype string) IMetaDataClient
- func (vpc *MetaDataClient) Url() (string, error)
- func (vpc *MetaDataClient) Version(version string) IMetaDataClient
- type Request
- type TimeoutError
Constants ¶
View Source
const ( ENDPOINT = "http://100.100.100.200" META_VERSION_LATEST = "latest" RS_TYPE_META_DATA = "meta-data" RS_TYPE_USER_DATA = "user-data" DNS_NAMESERVERS = "dns-conf/nameservers" EIPV4 = "eipv4" HOSTNAME = "hostname" IMAGE_ID = "image-id" INSTANCE_ID = "instance-id" MAC = "mac" NETWORK_TYPE = "network-type" NTP_CONF_SERVERS = "ntp-conf/ntp-servers" OWNER_ACCOUNT_ID = "owner-account-id" PRIVATE_IPV4 = "private-ipv4" REGION = "region-id" SERIAL_NUMBER = "serial-number" SOURCE_ADDRESS = "source-address" VPC_CIDR_BLOCK = "vpc-cidr-block" VPC_ID = "vpc-id" VSWITCH_CIDR_BLOCK = "vswitch-cidr-block" VSWITCH_ID = "vswitch-id" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMetaDataClient ¶
type IMetaDataClient interface { Version(version string) IMetaDataClient ResourceType(rtype string) IMetaDataClient Resource(resource string) IMetaDataClient Go() ([]string, error) Url() (string, error) }
type MetaData ¶
type MetaData struct {
// contains filtered or unexported fields
}
func NewMetaData ¶
func (*MetaData) DNSNameServers ¶
func (*MetaData) InstanceID ¶
func (*MetaData) NTPConfigServers ¶
func (*MetaData) NetworkType ¶
func (*MetaData) OwnerAccountID ¶
func (*MetaData) PrivateIPv4 ¶
func (*MetaData) SerialNumber ¶
func (*MetaData) SourceAddress ¶
func (*MetaData) VpcCIDRBlock ¶
func (*MetaData) VswitchCIDRBlock ¶
type MetaDataClient ¶
type MetaDataClient struct {
// contains filtered or unexported fields
}
func (*MetaDataClient) Go ¶
func (vpc *MetaDataClient) Go() (resu []string, err error)
func (*MetaDataClient) Resource ¶
func (vpc *MetaDataClient) Resource(resource string) IMetaDataClient
func (*MetaDataClient) ResourceType ¶
func (vpc *MetaDataClient) ResourceType(rtype string) IMetaDataClient
func (*MetaDataClient) Url ¶
func (vpc *MetaDataClient) Url() (string, error)
func (*MetaDataClient) Version ¶
func (vpc *MetaDataClient) Version(version string) IMetaDataClient
type TimeoutError ¶
Click to show internal directories.
Click to hide internal directories.