metricator/internal/models/request_info.go

16 lines
596 B
Go
Raw Normal View History

package models
// RequestInfo is a parsed request information to throw into application's handler.
type RequestInfo struct {
2020-12-23 20:55:50 +05:00
// Application is a name of application. We should ask it's handler for metrics.
Application string
2020-12-23 20:55:50 +05:00
// Metric is a metric name with parameters (e.g. requests{path='/',code=200} will
// be "requests/path:\//code:200").
Metric string
// Request type is a type of request. Currently known: "apps_list", "info", and "metrics".
// All other request types will produce HTTP 400 error.
RequestType string
2020-12-23 20:55:50 +05:00
// APIVersion is a version of API requested.
APIVersion int
}