Documentation ¶
Index ¶
- func Authorize(secret string, opts ...AuthorizeOption) func(http.Handler) http.Handler
- func BreakerHandler(method, path string, metrics *stat.Metrics) func(http.Handler) http.Handler
- func ContentSecurityHandler(decrypters map[string]codec.RsaDecrypter, tolerance time.Duration, strict bool, ...) func(http.Handler) http.Handler
- func CryptionHandler(key []byte) func(http.Handler) http.Handler
- func DetailedLogHandler(next http.Handler) http.Handler
- func GunzipHandler(next http.Handler) http.Handler
- func LogHandler(next http.Handler) http.Handler
- func MaxBytesHandler(n int64) func(http.Handler) http.Handler
- func MaxConns(n int) func(http.Handler) http.Handler
- func MetricHandler(metrics *stat.Metrics) func(http.Handler) http.Handler
- func PromethousHandler(path string) func(http.Handler) http.Handler
- func RecoverHandler(next http.Handler) http.Handler
- func SheddingHandler(shedder load.Shedder, metrics *stat.Metrics) func(http.Handler) http.Handler
- func TimeoutHandler(duration time.Duration) func(http.Handler) http.Handler
- func TracingHandler(next http.Handler) http.Handler
- type AuthorizeOption
- type AuthorizeOptions
- type DetailLoggedResponseWriter
- type LoggedResponseWriter
- type UnauthorizedCallback
- type UnsignedCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BreakerHandler ¶
func ContentSecurityHandler ¶
func SheddingHandler ¶
Types ¶
type AuthorizeOption ¶
type AuthorizeOption func(opts *AuthorizeOptions)
func WithPrevSecret ¶
func WithPrevSecret(secret string) AuthorizeOption
func WithUnauthorizedCallback ¶
func WithUnauthorizedCallback(callback UnauthorizedCallback) AuthorizeOption
type AuthorizeOptions ¶
type AuthorizeOptions struct { PrevSecret string Callback UnauthorizedCallback }
type DetailLoggedResponseWriter ¶
type DetailLoggedResponseWriter struct {
// contains filtered or unexported fields
}
func (*DetailLoggedResponseWriter) Flush ¶
func (w *DetailLoggedResponseWriter) Flush()
func (*DetailLoggedResponseWriter) Header ¶
func (w *DetailLoggedResponseWriter) Header() http.Header
func (*DetailLoggedResponseWriter) Write ¶
func (w *DetailLoggedResponseWriter) Write(bs []byte) (int, error)
func (*DetailLoggedResponseWriter) WriteHeader ¶
func (w *DetailLoggedResponseWriter) WriteHeader(code int)
type LoggedResponseWriter ¶
type LoggedResponseWriter struct {
// contains filtered or unexported fields
}
func (*LoggedResponseWriter) Flush ¶
func (w *LoggedResponseWriter) Flush()
func (*LoggedResponseWriter) Header ¶
func (w *LoggedResponseWriter) Header() http.Header
func (*LoggedResponseWriter) Write ¶
func (w *LoggedResponseWriter) Write(bytes []byte) (int, error)
func (*LoggedResponseWriter) WriteHeader ¶
func (w *LoggedResponseWriter) WriteHeader(code int)
type UnauthorizedCallback ¶
type UnauthorizedCallback func(w http.ResponseWriter, r *http.Request, err error)
type UnsignedCallback ¶
Click to show internal directories.
Click to hide internal directories.