debug

package
v0.6.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Addr ...
	Addr o.Opt = iota
	// Routes ...
	Routes
)

Variables

This section is empty.

Functions

func New

func New(opts ...o.OptFunc[o.Opt, any]) server.Listener

New ...

func WithPprof

func WithPprof() o.OptFunc[o.Opt, any]

WithPprof ...

func WithPrometheusHandler

func WithPrometheusHandler(handler http.Handler) o.OptFunc[o.Opt, any]

WithPrometheusHandler is adding this prometheus http handler as an option.

func WithStatusAddr

func WithStatusAddr(addr string) o.OptFunc[o.Opt, any]

WithStatusAddr is adding this status addr as an option.

Types

type Options

type Options struct {
	o.Options[o.Opt, any]
}

DebugOptions are the options for the debug listener.

func (*Options) Addr

func (o *Options) Addr() string

Addr ...

func (*Options) Routes

func (o *Options) Routes() map[string]http.Handler

Addr ...

type Opts

type Opts interface {
	// Addr ...
	Addr() string
	// Routes ...
	Routes() map[string]http.Handler

	o.Opts[o.Opt, any]
}

Opts are the options for the debug listener

func NewOpts

func NewOpts(opts ...o.OptFunc[o.Opt, any]) Opts

NewOpts returns a new instance of the debug options.

Jump to

Keyboard shortcuts

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