debug

package
v1.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 ConfigDump

func ConfigDump(r http.Handler) Option

ConfigDump to be documented.

func Context

func Context(ctx context.Context) Option

Context provides a function to set the context option.

func CorsAllowCredentials

func CorsAllowCredentials(allow bool) Option

CorsAllowCredentials provides a function to set the CorsAllowAllowCredential option.

func CorsAllowedHeaders

func CorsAllowedHeaders(headers []string) Option

CorsAllowedHeaders provides a function to set the CorsAllowedHeaders option.

func CorsAllowedMethods

func CorsAllowedMethods(methods []string) Option

CorsAllowedMethods provides a function to set the CorsAllowedMethods option.

func CorsAllowedOrigins

func CorsAllowedOrigins(origins []string) Option

CorsAllowedOrigins provides a function to set the CorsAllowedOrigin option.

func Health

func Health(h http.Handler) 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 http.Handler) 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
	Context              context.Context
	Name                 string
	Version              string
	Address              string
	Token                string
	Pprof                bool
	Zpages               bool
	Health               http.Handler
	Ready                http.Handler
	ConfigDump           http.Handler
	CorsAllowedOrigins   []string
	CorsAllowedMethods   []string
	CorsAllowedHeaders   []string
	CorsAllowCredentials bool
}

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