debug

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: Apache-2.0 Imports: 14 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 Options

type Options struct {
	// ListenAddress is the address to listen on. Defaults to "localhost:6060".
	ListenAddress string `mapstructure:"listen-address"`
	// PathPrefix is the path prefix to use for the debug server.
	// Defaults to "/debug".
	PathPrefix string `mapstructure:"path-prefix"`
	// DisablePProf disables pprof.
	DisablePProf bool `mapstructure:"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"`
	// EnableDBQuerier enables the database querier.
	EnableDBQuerier bool `mapstructure:"enable-db-querier"`
}

Options are the options for the debug plugin.

func NewDefaultOptions

func NewDefaultOptions() Options

NewDefaultOptions returns the default options for the debug plugin.

type Plugin

type Plugin struct {
	v1.UnimplementedPluginServer
	v1.UnimplementedIPAMPluginServer
	// 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

func (p *Plugin) InjectQuerier(srv v1.Plugin_InjectQuerierServer) error

InjectQuerier injects the querier.

Jump to

Keyboard shortcuts

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