Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMiddleware ¶
func NewMiddleware(mp Provider, skipPaths ...string) gin.HandlerFunc
Types ¶
type Provider ¶
type Provider interface { // RecordApiCount increases count of api request with given code, method, path labels RecordApiCount(code int, method, path string) // RecordApiLatency observes given elapsed mills with given code, method, path labels RecordApiLatency(code int, method, path string, elapsed time.Duration) // RecordCache increases count of cache request with given key, hit RecordCache(key string, hit bool) }
func NewProvider ¶
NewProvider returns a new Provider with given conf config.Config.
Click to show internal directories.
Click to hide internal directories.