Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeysMap ¶
type KeysMap struct {
// contains filtered or unexported fields
}
KeysMap has methods Metric and Sum that can be used as a fasthttp.RequestHandler for routing with fasthttp/routing. All access to the internal keys map is mutex protected and thread safe.
func (*KeysMap) Metric ¶
func (km *KeysMap) Metric(ctx *fasthttp.RequestCtx)
Metric allows the saving of a metric value with the associated key e.g. POST /metric/{key} { "value" = 4 }
func (*KeysMap) Sum ¶
func (km *KeysMap) Sum(ctx *fasthttp.RequestCtx)
Sum allows for the summation of all values for a given key using GET /metric/{key}/sum
Click to show internal directories.
Click to hide internal directories.