metadata

package
v1.5.0-rc2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Root                 string
	Client               pkg.Getter
	APIVersion           string
	IsAvailableCheckPath string
	UserdataPath         string
	MetadataPath         string
	// contains filtered or unexported fields
}

func NewDatasource

func NewDatasource(root, apiVersion, userdataPath, metadataPath string, header http.Header) Service

NewDatasource creates as HTTP based cloud-data service with the corresponding paths for the user-data and meta-data. To check the available in IsAvailable, the apiVersion is used as path.

func NewDatasourceWithCheckPath added in v1.4.0

func NewDatasourceWithCheckPath(root, apiVersion, isAvailableCheckPath, userdataPath, metadataPath string, header http.Header) Service

NewDatasourceWithCheckPath creates as HTTP based cloud-data service with the corresponding paths for the user-data and meta-data.

func (Service) AvailabilityChanges

func (ms Service) AvailabilityChanges() bool

func (Service) ConfigRoot

func (ms Service) ConfigRoot() string

func (Service) FetchAttribute added in v1.1.2

func (ms Service) FetchAttribute(key string) (string, error)

func (Service) FetchAttributes added in v1.1.2

func (ms Service) FetchAttributes(key string) ([]string, error)

func (Service) FetchData

func (ms Service) FetchData(url string) ([]byte, error)

func (Service) FetchUserdata

func (ms Service) FetchUserdata() ([]byte, error)

func (*Service) Finish

func (ms *Service) Finish() error

func (Service) IsAvailable

func (ms Service) IsAvailable() bool

func (Service) MetadataURL

func (ms Service) MetadataURL() string

func (*Service) String

func (ms *Service) String() string

func (Service) UserdataURL

func (ms Service) UserdataURL() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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