Back to / profiling

Package profiling

Latest Go to latest

The highest tagged major version is .

Published: Nov 4, 2019 | License: Apache-2.0 | Module:



const (
	// ProfilingPort specifies the port where profiling data is available when profiling is enabled
	ProfilingPort = 8008

func NewServer

func NewServer(handler http.Handler) *http.Server

NewServer creates a new http server that exposes profiling data on the default profiling port

type Handler

type Handler struct {
	// contains filtered or unexported fields

Handler holds the main HTTP handler and a flag indicating whether the handler is active

func NewHandler

func NewHandler(logger *zap.SugaredLogger, enableProfiling bool) *Handler

NewHandler create a new ProfilingHandler which serves runtime profiling data according to the given context path

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateFromConfigMap

func (h *Handler) UpdateFromConfigMap(configMap *corev1.ConfigMap)

UpdateFromConfigMap modifies the Enabled flag in the Handler according to the value in the given ConfigMap

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier