Version: v2.8.3 Latest Latest

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 18 Imported by: 0




This section is empty.


This section is empty.


func ChiRouteName

func ChiRouteName(r *http.Request) string

ChiRouteName replace route parameters from the Chi route mux with "*"

func MethodAndPathCleanID

func MethodAndPathCleanID(r *http.Request) string

MethodAndPathCleanID replace string values that look like ids (uuids and int) with "*"

func PathWithCleanID

func PathWithCleanID(r *http.Request) string

PathWithCleanID replace string values that look like ids (uuids and int) with "*"

func WithCORS

func WithCORS(allowedOrigins, allowedMethods, allowedHeaders []string, allowCredentials bool) server.Option

WithCORS configures CORS on the webserver

func WithCORSWideOpen

func WithCORSWideOpen() server.Option

WithCORSWideOpen allows requests from all origins with all methods and all headers/cookies/credentials allowed.

func WithLogging

func WithLogging(app string) server.Option

WithLogging configures a logrus middleware for that server

func WithMetrics

func WithMetrics(app string, opNameFunc func(r *http.Request) string) server.Option

WithMetrics configures metrics collection

func WithRecovery

func WithRecovery(writer io.Writer, printStack bool) server.Option

WithRecovery configures panic recovery for that server

func WithTracing

func WithTracing(app string, tags map[string]string, opNameFunc func(r *http.Request) string) server.Option

WithTracing configures tracing for that server; if configuration fails, WithTracing will panic


This section is empty.


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL