Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface { Logger() Logger Instrumentation() Instrumentation }
Config combines environmental concerns like logging and instrumentation with any other config
type Formatter ¶
type Formatter interface {
Format(resp http.ResponseWriter, data []byte) error
}
Formatter will build the output
type Instrumentation ¶
type Instrumentation interface { Count(key string, value int) Duration(key string, start time.Time) }
Instrumentation records the performances and events
type Logger ¶
type Logger interface { Error(message string, args ...interface{}) Warn(message string, args ...interface{}) Info(message string, args ...interface{}) Debug(message string, args ...interface{}) }
Logger logs stuff
type MyHandler ¶
type MyHandler struct {
// contains filtered or unexported fields
}
MyHandler does something fantastic
func NewMyHandler ¶
type RateLimiter ¶
type RateLimiter interface { Acquire() Release() }
RateLimiter limits how many concurrent requests we can make or process
Click to show internal directories.
Click to hide internal directories.