Documentation ¶
Index ¶
- func CloneRuleGroup(g rulefmt.RuleGroup) rulefmt.RuleGroup
- func CloneRuleGroupList(list []rulefmt.RuleGroup) []rulefmt.RuleGroup
- func NewUpdateNotifier(finder RuleFinder) *updateNotifier
- type PrometheusRuleFinder
- type PrometheusRuleFinderOption
- type PrometheusRuleFinderOptions
- type RuleFinder
- type UpdateNotifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUpdateNotifier ¶
func NewUpdateNotifier(finder RuleFinder) *updateNotifier
Types ¶
type PrometheusRuleFinder ¶
type PrometheusRuleFinder struct { PrometheusRuleFinderOptions // contains filtered or unexported fields }
PrometheusRuleFinder can find rules defined in PrometheusRule CRDs.
func (*PrometheusRuleFinder) FindGroups ¶
type PrometheusRuleFinderOption ¶
type PrometheusRuleFinderOption func(*PrometheusRuleFinderOptions)
func WithLogger ¶
func WithLogger(lg *zap.SugaredLogger) PrometheusRuleFinderOption
func WithNamespaces ¶
func WithNamespaces(namespaces ...string) PrometheusRuleFinderOption
type PrometheusRuleFinderOptions ¶
type PrometheusRuleFinderOptions struct {
// contains filtered or unexported fields
}
func (*PrometheusRuleFinderOptions) Apply ¶
func (o *PrometheusRuleFinderOptions) Apply(opts ...PrometheusRuleFinderOption)
type RuleFinder ¶
func NewPrometheusRuleFinder ¶
func NewPrometheusRuleFinder(k8sClient client.Client, opts ...PrometheusRuleFinderOption) RuleFinder
type UpdateNotifier ¶
type UpdateNotifier interface { // Returns a channel that will receive a list of rule groups whenever // any rules are added, removed, or updated. The channel has a small buffer // and will initially contain the latest rule group list. // // If the context is canceled, the channel will be closed. Additionally, if // the channel's buffer is full, any updates will be dropped. NotifyC(ctx context.Context) <-chan []rulefmt.RuleGroup }
func NewPeriodicUpdateNotifier ¶
func NewPeriodicUpdateNotifier(ctx context.Context, finder RuleFinder, interval time.Duration) UpdateNotifier
Click to show internal directories.
Click to hide internal directories.