noclserver

package
v0.0.0-...-57feaeb Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(s *Server) *mux.Router

NewRouter returns a router bound to Server.

Types

type Metadata

type Metadata struct {
	LocalHostname string   `yaml:"local-name"`
	InstanceID    string   `yaml:"instance-id"`
	PublicKeys    []string `yaml:"public-keys"`
}

Metadata is cloud-init metadata.

type Server

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

Server implements http serving handlers.

func NewServer

func NewServer(
	vmregClient vmregistrypb.VMRegistryClient,
	pubkeystoreClient pubkeystore.PubkeyStoreClient,
	dnsName string,
	userDataTemplate string) Server

NewServer creates a new Server.

func (Server) HandleMetadata

func (s Server) HandleMetadata(ctx context.Context, w http.ResponseWriter, ip string)

HandleMetadata handles /meta-data request.

func (Server) HandleUserdata

func (s Server) HandleUserdata(ctx context.Context, w http.ResponseWriter, ip string)

HandleUserdata handles /user-data request.

Jump to

Keyboard shortcuts

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