Documentation ¶
Index ¶
- Constants
- func CorsMiddleware() gin.HandlerFunc
- func EnableTrace(config *HttpMetricsConfig, router *gin.Engine) error
- func PrefligthChecksMiddleware(allowedMethods string, allowedHeaders string) func(c *gin.Context)
- func RegisterVersionEndpoint(r gin.IRoutes)
- func ServiceStatusHandler(runChecks func() map[string]string) func(c *gin.Context)
- func StopTrace()
- func Version() string
- type HttpMetricsConfig
Constants ¶
View Source
const BasicHeaders = "Accept,Accept-Encoding, Access-Control-Allow-Credentials, Access-Control-Allow-Headers, Access-Control-Allow-Methods, Access-Control-Allow-Origin, " +
"Access-Control-Max-Age, Age, Allow,Authentication-Info, Authorization,CONNECT, Cache-Control, Connection, Content-Base, Content-Length, Content-Location, " +
"Content-MD5, Content-Type, Content-Version, Cookie, DELETE,Destination, Expires, From, GET, HEAD, Host, Keep-Alive, Location, MIME-Version, OPTION, OPTIONS, " +
"Optional, Origin, POST, PUT, Protocol, Proxy-Authenticate, Proxy-Authentication-Info, Proxy-Authorization, Proxy-Features, Public, Referer, Refresh, Resolver-Location, " +
"Sec-Websocket-Extensions, Sec-Websocket-Key, Sec-Websocket-Origin, Sec-Websocket-Protocol, Sec-Websocket-Version, Security-Scheme, Server, Set-Cookie, et-Cookie2, SetProfile, " +
"Status, Timeout, Title, URI, User-Agent, Version, WWW-Authenticate, X-Content-Duration, X-Content-Security-Policy, X-Content-Type-Options, X-CustomHeader, X-DNSPrefetch-Control, " +
"X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto, X-Frame-Options, X-Modified, X-OTHER, X-PING, X-Requested-With"
Because FireFox does not handle '*' in the Access-Control-Allow-Headers header
Variables ¶
This section is empty.
Functions ¶
func CorsMiddleware ¶
func CorsMiddleware() gin.HandlerFunc
func EnableTrace ¶
func EnableTrace(config *HttpMetricsConfig, router *gin.Engine) error
func RegisterVersionEndpoint ¶
func ServiceStatusHandler ¶
runChecks checks the status of the service and returns a map of errors
Types ¶
type HttpMetricsConfig ¶
Click to show internal directories.
Click to hide internal directories.