service

package
v0.0.0-...-562c152 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server           *server.Config
	MetadataValues   *MetadataValues
	MetadataPrefixes []string
}

type MetadataService

type MetadataService struct {
	// contains filtered or unexported fields
}

func NewMetadataService

func NewMetadataService(cfg *Config) *MetadataService

func (*MetadataService) Endpoints

func (service *MetadataService) Endpoints() map[string]map[string]http.HandlerFunc

Endpoints is a listing of all endpoints available in the MetadataService.

func (*MetadataService) GetHostName

func (s *MetadataService) GetHostName(w http.ResponseWriter, r *http.Request)

func (*MetadataService) GetIAM

func (s *MetadataService) GetIAM(w http.ResponseWriter, r *http.Request)

func (*MetadataService) GetIndex

func (s *MetadataService) GetIndex(w http.ResponseWriter, r *http.Request)

func (*MetadataService) GetInstanceId

func (s *MetadataService) GetInstanceId(w http.ResponseWriter, r *http.Request)

func (*MetadataService) GetInstanceType

func (s *MetadataService) GetInstanceType(w http.ResponseWriter, r *http.Request)

func (*MetadataService) GetMetadataIndex

func (s *MetadataService) GetMetadataIndex(w http.ResponseWriter, r *http.Request)

func (*MetadataService) GetSecurityCredentialDetails

func (s *MetadataService) GetSecurityCredentialDetails(w http.ResponseWriter, r *http.Request)

func (*MetadataService) GetSecurityCredentials

func (s *MetadataService) GetSecurityCredentials(w http.ResponseWriter, r *http.Request)

func (*MetadataService) Middleware

func (s *MetadataService) Middleware(h http.Handler) http.Handler

func (*MetadataService) Prefix

func (s *MetadataService) Prefix() string

type MetadataValues

type MetadataValues struct {
	Hostname            string              `json:"hostname"`
	InstanceId          string              `json:"instance-id"`
	InstanceType        string              `json:"instance-type"`
	SecurityCredentials SecurityCredentials `json:"security-credentials"`
}

type SecurityCredentials

type SecurityCredentials struct {
	User            string `json:"User"`
	AccessKeyId     string `json:"AccessKeyId"`
	SecretAccessKey string `json:"SecretAccessKey"`
	Token           string `json:"Token"`
	Expiration      string `json:"Expiration"`
}

Jump to

Keyboard shortcuts

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