debug

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package debug implements a plugin that exposes an HTTP server for debugging purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.3.1

type Config struct {
	// ListenAddress is the address to listen on. Defaults to "localhost:6060".
	ListenAddress string `mapstructure:"listen-address" koanf:"listen-address"`
	// PathPrefix is the path prefix to use for the debug server.
	// Defaults to "/debug".
	PathPrefix string `mapstructure:"path-prefix" koanf:"path-prefix"`
	// DisablePProf disables pprof.
	DisablePProf bool `mapstructure:"disable-pprof" koanf:"disable-pprof"`
	// PProfProfiles is the list of profiles to enable for pprof.
	// An empty list enables all profiles. Each will be available at
	// /<path-prefix>/pprof/<profile>.
	PprofProfiles string `mapstructure:"pprof-profiles" koanf:"pprof-profiles"`
	// EnableDBQuerier enables the database querier.
	EnableDBQuerier bool `mapstructure:"enable-db-querier" koanf:"enable-db-querier"`
}

Config are the options for the debug plugin.

func NewDefaultOptions

func NewDefaultOptions() Config

NewDefaultOptions returns the default options for the debug plugin.

func (*Config) AsMapStructure added in v0.3.1

func (c *Config) AsMapStructure() map[string]any

func (*Config) BindFlags added in v0.3.1

func (o *Config) BindFlags(prefix string, fs *pflag.FlagSet)

BindFlags binds the debug plugin flags.

func (*Config) DefaultOptions added in v0.3.1

func (c *Config) DefaultOptions() *Config

DefaultOptions returns the default options for the plugin.

func (*Config) SetMapStructure added in v0.8.0

func (c *Config) SetMapStructure(in map[string]any)

type Plugin

type Plugin struct {
	v1.UnimplementedPluginServer
	v1.UnimplementedStorageQuerierPluginServer
	// contains filtered or unexported fields
}

Plugin is the debug plugin.

func (*Plugin) Close

func (p *Plugin) Close(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error)

Close closes the plugin.

func (*Plugin) Configure

func (p *Plugin) Configure(ctx context.Context, req *v1.PluginConfiguration) (*emptypb.Empty, error)

Configure configures the plugin.

func (*Plugin) GetInfo

func (p *Plugin) GetInfo(context.Context, *emptypb.Empty) (*v1.PluginInfo, error)

GetInfo returns the plugin info.

func (*Plugin) InjectQuerier

InjectQuerier injects the querier.

Jump to

Keyboard shortcuts

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