Documentation ¶
Index ¶
Constants ¶
const ContentEncoding = "deflate"
ContentEncoding represents the value in which http request was received
const ContentEncodingHeader = "Content-Encoding"
ContentEncodingHeader represents the header value in which http request was received
const HostOverride = "dogstatsd-sift"
HostOverride is the default value for Host in a Mt
const OriginAPIEndpoint = "/api/v1/series"
OriginAPIEndpoint is the datadog endpoint to proxy request back to
Variables ¶
This section is empty.
Functions ¶
func HandleRequest ¶
HandleRequest works on an http request to decode (from deflate), parse, modify and then encode back request in the way it was received, with the modified values, so it can be proxied back to the origin.
Types ¶
type DataPoint ¶
type DataPoint [2]float64
DataPoint is a tuple of [UNIX timestamp, value]. Values can be int too, hence float.
type Metric ¶
type Metric struct { Metric string `json:"metric,omitempty"` Points []DataPoint `json:"points,omitempty"` Type string `json:"type,omitempty"` Host string `json:"host,omitempty"` Tags []string `json:"tags,omitempty"` Unit string `json:"unit,omitempty"` SourceTypeName string `json:"source_type_name,omitempty"` Interval int `json:"interval,omitempty"` }
Metric represents a collection of data points that we send/receive on /api/v1/series collection endpoint
type RequestSeriesPayload ¶
type RequestSeriesPayload struct {
Series []Metric `json:"series,omitempty"`
}
RequestSeriesPayload collection from /api/v1/series