Documentation ¶
Index ¶
- func NewRouter(s *Server) *mux.Router
- type Server
- func (s Server) HandleHostname(ctx context.Context, w http.ResponseWriter, ip string)
- func (s Server) HandleInstanceID(ctx context.Context, w http.ResponseWriter, ip string)
- func (s Server) HandleMetadata(w http.ResponseWriter)
- func (s Server) HandlePublicKey(ctx context.Context, w http.ResponseWriter, ip string, keyIdx int)
- func (s Server) HandlePublicKeyData(ctx context.Context, w http.ResponseWriter, ip string, keyIdx int)
- func (s Server) HandlePublicKeys(ctx context.Context, w http.ResponseWriter, ip string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
HandleHostname handles /meta-data/hostname request.
func (Server) HandleInstanceID ¶
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 ¶
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 ¶
HandlePublicKeys handles /meta-data/public-keys/ request.
Click to show internal directories.
Click to hide internal directories.