Documentation ¶
Overview ¶
Common interfaces/types that middlewares and utilites depend on.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrComponentNotConfigured = errors.New("Component not configured") ErrComponentConfigured = errors.New("Component configured") )
Some common errors.
View Source
var DefaultFallbackHandler = func(w http.ResponseWriter, _ *http.Request, msg string, status int) { if status == 0 { status = http.StatusOK } if msg == "" { msg = http.StatusText(status) } http.Error(w, msg, status) }
DefaultFallbackHandler == http.Error.
Functions ¶
This section is empty.
Types ¶
type FallbackHandler ¶
FallbackHandler is used for fallback response. Usually used for 4xx/5xx.
type Logger ¶
type Logger interface {
Log(keyvals ...interface{}) error
}
Logger interface comes from go-kit's log package. Also see: http://go-talks.appspot.com/github.com/ChrisHines/talks/structured-logging/structured-logging.slide#1
type LoggerGetter ¶
LoggerGetter gets Logger from context.
Click to show internal directories.
Click to hide internal directories.