Documentation
¶
Index ¶
- func AddToScheme(scheme *runtime.Scheme) error
- func BuildPrometheusRule(name, namespace string, labels map[string]string) (*promv1.PrometheusRule, error)
- func BuildRoleAndRoleBinding(namePrefix, namespace, promSAName, promSANamespace string, ...) (*rbacv1.Role, *rbacv1.RoleBinding)
- func ListAlerts() []promv1.Rule
- func RegisterAlerts(alerts ...[]promv1.Rule) error
- func RegisterRecordingRules(recordingRules ...[]RecordingRule) error
- type RecordingRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToScheme ¶
func BuildPrometheusRule ¶
func BuildPrometheusRule(name, namespace string, labels map[string]string) (*promv1.PrometheusRule, error)
BuildPrometheusRule builds a PrometheusRule object from the registered recording rules and alerts.
func BuildRoleAndRoleBinding ¶
func RegisterAlerts ¶
RegisterAlerts registers the given alerts.
func RegisterRecordingRules ¶
func RegisterRecordingRules(recordingRules ...[]RecordingRule) error
RegisterRecordingRules registers the given recording rules.
Types ¶
type RecordingRule ¶
type RecordingRule struct { MetricsOpts operatormetrics.MetricOpts MetricType operatormetrics.MetricType Expr intstr.IntOrString }
RecordingRule is a struct that represents a Prometheus recording rule.
func ListRecordingRules ¶
func ListRecordingRules() []RecordingRule
ListRecordingRules returns the registered recording rules.
func (RecordingRule) GetOpts ¶
func (c RecordingRule) GetOpts() operatormetrics.MetricOpts
GetOpts returns the metric options of the recording rule.
func (RecordingRule) GetType ¶
func (c RecordingRule) GetType() operatormetrics.MetricType
GetType returns the metric type of the recording rule.
Click to show internal directories.
Click to hide internal directories.