Documentation ¶
Index ¶
- func Create(dataBase moira.Database) metricSource.MetricSource
- func FetchData(database moira.Database, pattern string, from int64, until int64, ...) ([]*types.MetricData, []string, error)
- type ErrEvalExpr
- type ErrEvaluateTargetFailedWithPanic
- type ErrParseExpr
- type ErrUnknownFunction
- type FetchResult
- type Local
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrEvalExpr ¶
type ErrEvalExpr struct {
// contains filtered or unexported fields
}
ErrEvalExpr used when carbonapi.EvalExpr returns error
func (ErrEvalExpr) Error ¶
func (err ErrEvalExpr) Error() string
Error is implementation of golang error interface for ErrEvalExpr struct
type ErrEvaluateTargetFailedWithPanic ¶
type ErrEvaluateTargetFailedWithPanic struct {
// contains filtered or unexported fields
}
ErrEvaluateTargetFailedWithPanic used to identify occurred error as a result of recover from panic
func (ErrEvaluateTargetFailedWithPanic) Error ¶
func (err ErrEvaluateTargetFailedWithPanic) Error() string
Error is implementation of golang error interface for ErrEvaluateTargetFailedWithPanic struct
type ErrParseExpr ¶
type ErrParseExpr struct {
// contains filtered or unexported fields
}
ErrParseExpr used when carbonapi.ParseExpr returns error
func (ErrParseExpr) Error ¶
func (err ErrParseExpr) Error() string
Error is implementation of golang error interface for ErrParseExpr struct
type ErrUnknownFunction ¶
type ErrUnknownFunction struct { FuncName string // contains filtered or unexported fields }
ErrUnknownFunction used when carbonapi.ParseExpr returns unknown function error
func ErrorUnknownFunction ¶
func ErrorUnknownFunction(err error) ErrUnknownFunction
ErrorUnknownFunction parses internal carbon-api error errUnknownFunction, gets func name and return ErrUnknownFunction error
func (ErrUnknownFunction) Error ¶
func (err ErrUnknownFunction) Error() string
Error is implementation of golang error interface for ErrUnknownFunction struct
type FetchResult ¶
type FetchResult struct { MetricsData []*metricSource.MetricData Patterns []string Metrics []string }
FetchResult is implementation of metric_source.FetchResult interface, which represent fetching result from moira data source in moira format
func CreateEmptyFetchResult ¶
func CreateEmptyFetchResult() *FetchResult
CreateEmptyFetchResult just creates FetchResult with initialized empty fields
func (*FetchResult) GetMetricsData ¶
func (fetchResult *FetchResult) GetMetricsData() []*metricSource.MetricData
GetMetricsData return all metrics data from fetch result
func (*FetchResult) GetPatternMetrics ¶
func (fetchResult *FetchResult) GetPatternMetrics() ([]string, error)
GetPatternMetrics return all metrics which match to evaluated graphite target patterns
func (*FetchResult) GetPatterns ¶
func (fetchResult *FetchResult) GetPatterns() ([]string, error)
GetPatterns return all patterns which contains in evaluated graphite target
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
Local is implementation of MetricSource interface, which implements fetch metrics method from moira database installation
func (*Local) Fetch ¶
func (local *Local) Fetch(target string, from int64, until int64, allowRealTimeAlerting bool) (metricSource.FetchResult, error)
Fetch is analogue of evaluateTarget method in graphite-web, that gets target metrics value from DB and Evaluate it using carbon-api eval package
func (*Local) IsConfigured ¶
IsConfigured always returns true. It easy to configure local source =)