digitalocean

package
v1.0.5-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAddress = "http://169.254.169.254/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	IPAddress string `json:"ip_address"`
	Netmask   string `json:"netmask"`
	Cidr      int    `json:"cidr"`
	Gateway   string `json:"gateway"`
}

type DNS

type DNS struct {
	Nameservers []string `json:"nameservers"`
}

type Interface

type Interface struct {
	IPv4       *Address `json:"ipv4"`
	IPv6       *Address `json:"ipv6"`
	AnchorIPv4 *Address `json:"anchor_ipv4"`
	MAC        string   `json:"mac"`
	Type       string   `json:"type"`
}

type Interfaces

type Interfaces struct {
	Public  []Interface `json:"public"`
	Private []Interface `json:"private"`
}

type Metadata

type Metadata struct {
	Hostname   string     `json:"hostname"`
	Interfaces Interfaces `json:"interfaces"`
	PublicKeys []string   `json:"public_keys"`
	DNS        DNS        `json:"dns"`
}

type MetadataService

type MetadataService struct {
	metadata.Service
}

func NewDatasource

func NewDatasource(root string) *MetadataService

func (MetadataService) AvailabilityChanges

func (ms MetadataService) AvailabilityChanges() bool

func (*MetadataService) FetchMetadata

func (ms *MetadataService) FetchMetadata() (metadata datasource.Metadata, err error)

func (MetadataService) Type

func (ms MetadataService) Type() string

Jump to

Keyboard shortcuts

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