Documentation ¶
Overview ¶
Package types defines the main Graphite types we use internally.
The definitions correspond to the types of responses to the /render, /info, and /metrics/find handlers in graphite-web and go-carbon.
Index ¶
- Variables
- func AreFloatsApproximatelyEqual(a, b float64) bool
- func MergeMetrics(metrics [][]Metric, replicaMismatchConfig cfg.RenderReplicaMismatchConfig, ...) ([]Metric, MetricRenderStats)
- func MetricsEqual(a, b Metric) bool
- type ErrNotFound
- type FindRequest
- type Info
- type InfoRequest
- type Match
- type Matches
- type Metric
- type MetricRenderStats
- type RenderRequest
- type Retention
- type Trace
- func (t Trace) AddHTTPCall(start time.Time)
- func (t Trace) AddLimiter(start time.Time)
- func (t Trace) AddMarshal(start time.Time)
- func (t Trace) AddReadBody(start time.Time)
- func (t Trace) AddUnmarshal(start time.Time)
- func (t Trace) IncCall()
- func (t Trace) ObserveOutDuration(ti time.Duration, dc string, cluster string)
- func (t Trace) Report() []int64
Constants ¶
This section is empty.
Variables ¶
var ( ErrMetricsNotFound = ErrNotFound("No metrics returned") ErrMatchesNotFound = ErrNotFound("No matches found") ErrInfoNotFound = ErrNotFound("No information found") )
Functions ¶
func AreFloatsApproximatelyEqual ¶ added in v0.3.0
func MergeMetrics ¶
func MergeMetrics(metrics [][]Metric, replicaMismatchConfig cfg.RenderReplicaMismatchConfig, logger *zap.Logger) ([]Metric, MetricRenderStats)
MergeMetrics merges metrics by name. It returns merged metrics, number of rendered data points for the returned metrics, and number of mismatched data points seen (if mismatchCheck is true).
func MetricsEqual ¶
Types ¶
type ErrNotFound ¶
type ErrNotFound string
ErrNotFound signals the HTTP not found error
func (ErrNotFound) Error ¶
func (err ErrNotFound) Error() string
Error makes ErrNotFound compliant with the error interface
type FindRequest ¶
func NewFindRequest ¶
func NewFindRequest(query string) FindRequest
type Info ¶
type Info struct { Host string Name string AggregationMethod string MaxRetention int32 XFilesFactor float32 Retentions []Retention }
Info contains metadata about a metric in Graphite.
type InfoRequest ¶
func NewInfoRequest ¶
func NewInfoRequest(target string) InfoRequest
type Matches ¶
Matches describes a glob match from a Graphite store.
func MergeMatches ¶
MergeMatches merges Match structures.
type Metric ¶
type Metric struct { Name string StartTime int32 StopTime int32 StepTime int32 Values []float64 IsAbsent []bool }
Metric represents a part of a time series.
type MetricRenderStats ¶ added in v0.3.0
MetricRenderStats represents the stats of rendering and merging metrics.
type RenderRequest ¶
func NewRenderRequest ¶
func NewRenderRequest(targets []string, from int32, until int32) RenderRequest
type Trace ¶
type Trace struct { OutDuration *prometheus.HistogramVec // contains filtered or unexported fields }
func (Trace) AddHTTPCall ¶
func (Trace) AddLimiter ¶
func (Trace) AddMarshal ¶
func (Trace) AddReadBody ¶
func (Trace) AddUnmarshal ¶
func (Trace) ObserveOutDuration ¶ added in v0.2.0
Directories ¶
Path | Synopsis |
---|---|
encoding
|
|
carbonapi_v2
Package carbonapi_v2 defines encoding and decoding methods for Find, Info and Render responses.
|
Package carbonapi_v2 defines encoding and decoding methods for Find, Info and Render responses. |
json
Package json defines encoding and decoding methods for Find, Info and Render responses.
|
Package json defines encoding and decoding methods for Find, Info and Render responses. |
pickle
Package pickle defines encoding methods for Find and Render responses.
|
Package pickle defines encoding methods for Find and Render responses. |