Documentation
¶
Index ¶
- Variables
- func FormatTypes() []string
- func MetricsTimestampTruncate(metrics []Metric, precision time.Duration)
- func TagsNames(client *http.Client, address string, format FormatType, query string, ...) (string, []string, http.Header, error)
- func TagsValues(client *http.Client, address string, format FormatType, query string, ...) (string, []string, http.Header, error)
- type FindMatch
- type FormatType
- type HttpError
- type Metric
- type MultiGlobRequestV3
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyQuery = errors.New("missing query")
View Source
var ErrInvalidFrom = errors.New("invalid from")
View Source
var ErrInvalidQuery = errors.New("invalid query")
View Source
var ErrInvalidUntil = errors.New("invalid until")
View Source
var ErrUnsupportedFormat = errors.New("unsupported format")
Functions ¶
func FormatTypes ¶
func FormatTypes() []string
func TagsNames ¶
func TagsNames(client *http.Client, address string, format FormatType, query string, limit uint64, from, until int64) (string, []string, http.Header, error)
TagsNames do /tags/autoComplete/tags request with query like [tagPrefix];tag1=value1;tag2=~value* Valid formats are json
func TagsValues ¶
func TagsValues(client *http.Client, address string, format FormatType, query string, limit uint64, from, until int64) (string, []string, http.Header, error)
TagsValues do /tags/autoComplete/values request with query like searchTag[=valuePrefix];tag1=value1;tag2=~value* Valid formats are json
Types ¶
type FormatType ¶
type FormatType int
const ( FormatDefault FormatType = iota FormatJSON FormatProtobuf FormatPb_v2 // alias for FormatProtobuf FormatPb_v3 FormatPickle )
func (*FormatType) Set ¶
func (a *FormatType) Set(value string) error
func (*FormatType) String ¶
func (a *FormatType) String() string
func (*FormatType) UnmarshalText ¶
func (a *FormatType) UnmarshalText(text []byte) error
type HttpError ¶
type HttpError struct {
// contains filtered or unexported fields
}
func NewHttpError ¶
type Metric ¶
type Metric struct { Name string `toml:"name"` PathExpression string `toml:"path"` ConsolidationFunc string `toml:"consolidation"` StartTime int64 `toml:"start"` StopTime int64 `toml:"stop"` StepTime int64 `toml:"step"` XFilesFactor float32 `toml:"xfiles"` HighPrecisionTimestamps bool `toml:"precision"` Values []float64 `toml:"values"` AppliedFunctions []string `toml:"applied_functions"` RequestStartTime int64 `toml:"req_start"` RequestStopTime int64 `toml:"req_stop"` }
func Decode ¶ added in v0.14.0
func Decode(b []byte, format FormatType) ([]Metric, error)
Decode converts data in the give format to a Metric
func Render ¶
func Render(client *http.Client, address string, format FormatType, targets []string, filteringFunctions []*protov3.FilteringFunction, maxDataPoints, from, until int64) (string, []Metric, http.Header, error)
Render do /metrics/find/ request Valid formats are carbonapi_v3_pb. protobuf, pickle, json
type MultiGlobRequestV3 ¶
type MultiGlobRequestV3 struct {
protov3.MultiGlobRequest
}
func (*MultiGlobRequestV3) LogInfo ¶
func (r *MultiGlobRequestV3) LogInfo() interface{}
func (*MultiGlobRequestV3) Marshal ¶
func (r *MultiGlobRequestV3) Marshal() ([]byte, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.