mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-07 02:07:58 +00:00
Moving metric naming to it's own package
This commit is contained in:
parent
c2e176bb23
commit
6030912cc0
12 changed files with 93 additions and 227 deletions
|
|
@ -2,26 +2,20 @@ package provider
|
|||
|
||||
import "errors"
|
||||
|
||||
// NewOperatorNotSupportedByPrometheusError creates an error that represents the fact that we were requested to service a query that
|
||||
// Prometheus would be unable to support.
|
||||
func NewOperatorNotSupportedByPrometheusError() error {
|
||||
return errors.New("operator not supported by prometheus")
|
||||
}
|
||||
var (
|
||||
// ErrorNewOperatorNotSupportedByPrometheus creates an error that represents the fact that we were requested to service a query that
|
||||
// Prometheus would be unable to support.
|
||||
ErrorNewOperatorNotSupportedByPrometheus = errors.New("operator not supported by prometheus")
|
||||
|
||||
// NewOperatorRequiresValuesError creates an error that represents the fact that we were requested to service a query
|
||||
// that was malformed in its operator/value combination.
|
||||
func NewOperatorRequiresValuesError() error {
|
||||
return errors.New("operator requires values")
|
||||
}
|
||||
// ErrorNewOperatorRequiresValues creates an error that represents the fact that we were requested to service a query
|
||||
// that was malformed in its operator/value combination.
|
||||
ErrorNewOperatorRequiresValues = errors.New("operator requires values")
|
||||
|
||||
// NewOperatorDoesNotSupportValuesError creates an error that represents the fact that we were requested to service a query
|
||||
// that was malformed in its operator/value combination.
|
||||
func NewOperatorDoesNotSupportValuesError() error {
|
||||
return errors.New("operator does not support values")
|
||||
}
|
||||
// ErrorNewOperatorDoesNotSupportValues creates an error that represents the fact that we were requested to service a query
|
||||
// that was malformed in its operator/value combination.
|
||||
ErrorNewOperatorDoesNotSupportValues = errors.New("operator does not support values")
|
||||
|
||||
// NewLabelNotSpecifiedError creates an error that represents the fact that we were requested to service a query
|
||||
// that was malformed in its label specification.
|
||||
func NewLabelNotSpecifiedError() error {
|
||||
return errors.New("label not specified")
|
||||
}
|
||||
// ErrorNewLabelNotSpecified creates an error that represents the fact that we were requested to service a query
|
||||
// that was malformed in its label specification.
|
||||
ErrorNewLabelNotSpecified = errors.New("label not specified")
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue