Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// ErrConfigInvalid is returned when the config parse is invalid.
ErrConfigInvalid = `Invalid or missing config`
)
Functions ¶
This section is empty.
Types ¶
type NotFoundInterceptor ¶ added in v1.13.0
type NotFoundInterceptor struct { http.ResponseWriter // contains filtered or unexported fields }
func (*NotFoundInterceptor) Write ¶ added in v1.13.0
func (w *NotFoundInterceptor) Write(p []byte) (int, error)
func (*NotFoundInterceptor) WriteHeader ¶ added in v1.13.0
func (w *NotFoundInterceptor) WriteHeader(status int)
type Option ¶
type Option func(o *Options)
Option defines a single option function.
type Options ¶
type Options struct { Logger log.Logger Config *config.Config Middleware []func(http.Handler) http.Handler }
Options defines the available options for this package.
type Service ¶
type Service interface { ServeHTTP(http.ResponseWriter, *http.Request) Config(http.ResponseWriter, *http.Request) }
Service defines the extension handlers.
func NewInstrument ¶
NewInstrument returns a service that instruments metrics.
func NewLogging ¶
NewLogging returns a service that logs messages.
func NewService ¶
NewService returns a service implementation for Service.
func NewTracing ¶
NewTracing returns a service that instruments traces.
type Web ¶
type Web struct {
// contains filtered or unexported fields
}
Web defines implements the business logic for Service.
func (Web) Config ¶
func (p Web) Config(w http.ResponseWriter, r *http.Request)
Config implements the Service interface.
Click to show internal directories.
Click to hide internal directories.