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 MetricsEqual(a, b Metric) bool
- func SetCorruptionWatcher(threshold float64, logger *zap.Logger)
- type ErrNotFound
- type FindRequest
- type Info
- type InfoRequest
- type Match
- type Matches
- type Metric
- 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 ¶
View Source
var ( ErrMetricsNotFound = ErrNotFound("No metrics returned") ErrMatchesNotFound = ErrNotFound("No matches found") ErrInfoNotFound = ErrNotFound("No information found") )
Functions ¶
func MetricsEqual ¶
func SetCorruptionWatcher ¶
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.
func MergeMetrics ¶
MergeMetrics merges metrics by name.
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. |
Click to show internal directories.
Click to hide internal directories.