diagnostic

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(ctx context.Context, conf *Config, r *http.ServeMux) (func(), error)

Register adds diagnostic tools to main process

Types

type Config

type Config struct {
	GOPS struct {
		Enabled   bool   `toml:"enabled" default:"false" comment:"Enable GOPS agent"`
		RemoteURL string `toml:"remoteDebugURL" comment:"start a gops agent on specified URL. Ex: localhost:9999"`
	}
	PProf struct {
		Enabled bool `toml:"enabled" default:"true" comment:"Enable PProf handler"`
	}
	ZPages struct {
		Enabled bool `toml:"enabled" default:"true" comment:"Enable zPages handler"`
	}
}

Config holds information for diagnostic handlers.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks that the configuration is valid.

Jump to

Keyboard shortcuts

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