Documentation
¶
Index ¶
- func NewService(opts ...Option) *http.Server
- type Option
- func Address(a string) Option
- func ConfigDump(r http.Handler) Option
- func Context(ctx context.Context) Option
- func CorsAllowCredentials(allow bool) Option
- func CorsAllowedHeaders(headers []string) Option
- func CorsAllowedMethods(methods []string) Option
- func CorsAllowedOrigins(origins []string) Option
- func Health(h http.Handler) Option
- func Logger(l log.Logger) Option
- func Name(n string) Option
- func Pprof(p bool) Option
- func Ready(r http.Handler) Option
- func Token(t string) Option
- func Version(v string) Option
- func Zpages(z bool) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
NewService initializes a new debug service.
Types ¶
type Option ¶
type Option func(o *Options)
Option defines a single option function.
func CorsAllowCredentials ¶
CorsAllowCredentials provides a function to set the CorsAllowAllowCredential option.
func CorsAllowedHeaders ¶
CorsAllowedHeaders provides a function to set the CorsAllowedHeaders option.
func CorsAllowedMethods ¶
CorsAllowedMethods provides a function to set the CorsAllowedMethods option.
func CorsAllowedOrigins ¶
CorsAllowedOrigins provides a function to set the CorsAllowedOrigin 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.
Click to show internal directories.
Click to hide internal directories.