diagnostics

package
v3.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is an HTTP server running exposing the pprof profiling tool, and processing diagnostic dumps of Kong configurations.

func NewServer added in v3.1.0

func NewServer(logger logr.Logger, cfg ServerConfig) Server

NewServer creates a diagnostics server ready to start listening.

func (*Server) ConfigDumps

func (s *Server) ConfigDumps() util.ConfigDumpDiagnostic

ConfigDumps returns an object allowing dumping succeeded and failed configuration updates. It will return a zero value of the type in case the config dumps are not enabled.

func (*Server) Listen

func (s *Server) Listen(ctx context.Context, port int) error

Listen starts up the HTTP server and blocks until ctx expires.

type ServerConfig added in v3.1.0

type ServerConfig struct {
	// ProfilingEnabled enables profiling endpoints.
	ProfilingEnabled bool

	// ConfigDumpsEnabled enables config dumps endpoints.
	ConfigDumpsEnabled bool

	// DumpSensitiveConfig makes config dumps to include sensitive information.
	DumpSensitiveConfig bool
}

ServerConfig contains configuration for the diagnostics server.

Jump to

Keyboard shortcuts

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