metadata

package
v0.0.0-...-f8f9ceb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 NewMetaData(client *http.Client) *MetaData

func (*MetaData) DNSNameServers

func (m *MetaData) DNSNameServers() ([]string, error)

func (*MetaData) EIPv4

func (m *MetaData) EIPv4() (string, error)

func (*MetaData) HostName

func (m *MetaData) HostName() (string, error)

func (*MetaData) ImageID

func (m *MetaData) ImageID() (string, error)

func (*MetaData) InstanceID

func (m *MetaData) InstanceID() (string, error)

func (*MetaData) Mac

func (m *MetaData) Mac() (string, error)

func (*MetaData) NTPConfigServers

func (m *MetaData) NTPConfigServers() ([]string, error)

func (*MetaData) NetworkType

func (m *MetaData) NetworkType() (string, error)

func (*MetaData) OwnerAccountID

func (m *MetaData) OwnerAccountID() (string, error)

func (*MetaData) PrivateIPv4

func (m *MetaData) PrivateIPv4() (string, error)

func (*MetaData) Region

func (m *MetaData) Region() (string, error)

func (*MetaData) SerialNumber

func (m *MetaData) SerialNumber() (string, error)

func (*MetaData) SourceAddress

func (m *MetaData) SourceAddress() (string, error)

func (*MetaData) VpcCIDRBlock

func (m *MetaData) VpcCIDRBlock() (string, error)

func (*MetaData) VpcID

func (m *MetaData) VpcID() (string, error)

func (*MetaData) VswitchCIDRBlock

func (m *MetaData) VswitchCIDRBlock() (string, error)

func (*MetaData) VswitchID

func (m *MetaData) VswitchID() (string, error)

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 Request

type Request struct {
}

type TimeoutError

type TimeoutError interface {
	error
	Timeout() bool // Is the error a timeout?
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL