debug

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(opts ...Option) *http.Server

NewService initializes a new debug service.

Types

type Option

type Option func(o *Options)

Option defines a single option function.

func Address

func Address(a string) Option

Address provides a function to set the address option.

func Health

func Health(h func(http.ResponseWriter, *http.Request)) Option

Health provides a function to set the health option.

func Logger

func Logger(l log.Logger) Option

Logger provides a function to set the logger option.

func Name

func Name(n string) Option

Name provides a function to set the name option.

func Pprof

func Pprof(p bool) Option

Pprof provides a function to set the pprof option.

func Ready

func Ready(r func(http.ResponseWriter, *http.Request)) Option

Ready provides a function to set the ready option.

func Token

func Token(t string) Option

Token provides a function to set the token option.

func Version

func Version(v string) Option

Version provides a function to set the version option.

func Zpages

func Zpages(z bool) Option

Zpages provides a function to set the zpages option.

type Options

type Options struct {
	Logger  log.Logger
	Name    string
	Version string
	Address string
	Token   string
	Pprof   bool
	Zpages  bool
	Health  func(http.ResponseWriter, *http.Request)
	Ready   func(http.ResponseWriter, *http.Request)
}

Options defines the available options for this package.

Jump to

Keyboard shortcuts

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