server

package
v0.0.0-...-44dad58 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TranslatePath

func TranslatePath(req *restful.Request, tenantName string)

TranslatePath translate the naming between tenant and master cluster.

func TranslatePathForSuper

func TranslatePathForSuper(req *restful.Request, tenantName string) error

TranslatePathForSuper translates the URL path to kubelet to super apiserver

Types

type Server

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

Server is a http.Handler which exposes vn-agent functionality over HTTP.

func NewServer

func NewServer(cfg *config.Config) (*Server, error)

NewServer initializes and configures a vn-agent.Server object to handle HTTP requests.

func (*Server) InstallHandlers

func (s *Server) InstallHandlers()

InstallHandlers set router and handlers.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP responds to HTTP requests on the vn-agent.

Jump to

Keyboard shortcuts

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