Documentation ¶
Index ¶
- Constants
- type IMetaDataClient
- type MetaData
- func (m *MetaData) EniIpv4GateWay(mac, ip string) (string, error)
- func (m *MetaData) EniIpv4List(mac string) ([]string, error)
- func (m *MetaData) EniIpv4PublicIpv4(mac, ip string) (string, error)
- func (m *MetaData) EniIpv4PublicIpv4Mode(mac, ip string) (string, error)
- func (m *MetaData) EniIpv4SubnetMask(mac, ip string) (string, error)
- func (m *MetaData) EniMacs() ([]string, error)
- func (m *MetaData) EniPrimaryIpv4(mac string) (string, error)
- func (m *MetaData) InstanceID() (string, error)
- func (m *MetaData) Mac() (string, error)
- func (m *MetaData) PrivateIPv4() (string, error)
- func (m *MetaData) PublicIPv4() (string, error)
- func (m *MetaData) Region() (string, error)
- func (m *MetaData) UUID() (string, error)
- func (m *MetaData) Zone() (string, error)
- type MetaDataClient
- type Request
- type TimeoutError
Constants ¶
View Source
const ( ENDPOINT = "http://metadata.tencentyun.com/latest/meta-data" INSTANCE_ID = "instance-id" UUID = "uuid" MAC = "mac" PRIVATE_IPV4 = "local-ipv4" REGION = "placement/region" ZONE = "placement/zone" PUBLIC_IPV4 = "public-ipv4" ENI_MACS = "network/interfaces/macs" ENI_PRIMARY_IPV4 = "network/interfaces/macs/%s/primary-local-ipv4" ENI_IPV4S = "network/interfaces/macs/%s/local-ipv4s" ENI_IPV4_GATEWAY = "network/interfaces/macs/%s/local-ipv4s/%s/gateway" ENI_IPV4_PUBLIC_IPV4 = "network/interfaces/macs/%s/local-ipv4s/%s/public-ipv4" ENI_IPV4_PUBLIC_IPV4_MODE = "network/interfaces/macs/%s/local-ipv4s/%s/public-ipv4-mode" ENI_IPV4_SUBNET_MASK = "network/interfaces/macs/%s/local-ipv4s/%s/subnet-mask" NEWLINE_CHAR = "\n" DIR_SEQ = "/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMetaDataClient ¶
type MetaData ¶
type MetaData struct {
// contains filtered or unexported fields
}
func NewMetaData ¶
func (*MetaData) EniIpv4PublicIpv4 ¶
func (*MetaData) EniIpv4PublicIpv4Mode ¶
mode ---> EIP/NAT
func (*MetaData) EniIpv4SubnetMask ¶
mask ---> 255.255.0.0
func (*MetaData) InstanceID ¶
func (*MetaData) PrivateIPv4 ¶
func (*MetaData) PublicIPv4 ¶
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 (m *MetaDataClient) Resource(resource string) IMetaDataClient
func (*MetaDataClient) Url ¶
func (m *MetaDataClient) Url() (string, error)
type TimeoutError ¶
Click to show internal directories.
Click to hide internal directories.