ec2server

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: 12 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 Server

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

Server implements http serving handlers.

func NewServer

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

NewServer creates a new Server.

func (Server) HandleHostname

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

HandleHostname handles /meta-data/hostname request.

func (Server) HandleInstanceID

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

HandleInstanceID handles /meta-data/instance-id request.

func (Server) HandleMetadata

func (s Server) HandleMetadata(w http.ResponseWriter)

HandleMetadata handles /meta-data/ request.

func (Server) HandlePublicKey

func (s Server) HandlePublicKey(ctx context.Context, w http.ResponseWriter, ip string, keyIdx int)

HandlePublicKey handles /meta-data/public-keys/{key} request.

func (Server) HandlePublicKeyData

func (s Server) HandlePublicKeyData(ctx context.Context, w http.ResponseWriter, ip string, keyIdx int)

HandlePublicKeyData handles /meta-data/public-keys/{key}/openssh-key request.

func (Server) HandlePublicKeys

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

HandlePublicKeys handles /meta-data/public-keys/ request.

Jump to

Keyboard shortcuts

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