Documentation ¶
Index ¶
- Variables
- func NewAgentDurableReplayConsumer(clusterId string) *nats.ConsumerConfig
- func NewAgentStream() *nats.StreamConfig
- func NewAgentStreamSubject(clusterId string) string
- func NewCortexStatusStream() *nats.StreamConfig
- func NewCortexStatusSubject() string
- func NewDurableAgentReplaySubject(clusterId string) string
- type AlarmMetricsExporter
- type AlarmServerComponent
- func (a *AlarmServerComponent) ActivateSilence(ctx context.Context, req *alertingv1.SilenceRequest) (*emptypb.Empty, error)
- func (a *AlarmServerComponent) AlertConditionStatus(ctx context.Context, ref *alertingv1.ConditionReference) (*alertingv1.AlertStatusResponse, error)
- func (a *AlarmServerComponent) CloneTo(ctx context.Context, req *alertingv1.CloneToRequest) (*emptypb.Empty, error)
- func (a *AlarmServerComponent) CreateAlertCondition(ctx context.Context, req *alertingv1.AlertCondition) (*alertingv1.ConditionReference, error)
- func (a *AlarmServerComponent) DeactivateSilence(ctx context.Context, ref *alertingv1.ConditionReference) (*emptypb.Empty, error)
- func (a *AlarmServerComponent) DeleteAlertCondition(ctx context.Context, ref *alertingv1.ConditionReference) (*emptypb.Empty, error)
- func (a *AlarmServerComponent) GetAlertCondition(ctx context.Context, ref *alertingv1.ConditionReference) (*alertingv1.AlertCondition, error)
- func (a *AlarmServerComponent) Healthy() bool
- func (a *AlarmServerComponent) Initialize(conf AlarmServerConfiguration)
- func (a *AlarmServerComponent) ListAlertConditionChoices(ctx context.Context, req *alertingv1.AlertDetailChoicesRequest) (*alertingv1.ListAlertTypeDetails, error)
- func (a *AlarmServerComponent) ListAlertConditionGroups(ctx context.Context, _ *emptypb.Empty) (*corev1.ReferenceList, error)
- func (a *AlarmServerComponent) ListAlertConditions(ctx context.Context, req *alertingv1.ListAlertConditionRequest) (*alertingv1.AlertConditionList, error)
- func (a *AlarmServerComponent) ListAlertConditionsWithStatus(ctx context.Context, req *alertingv1.ListStatusRequest) (*alertingv1.ListStatusResponse, error)
- func (a *AlarmServerComponent) Name() string
- func (a *AlarmServerComponent) Ready() bool
- func (a *AlarmServerComponent) SetConfig(conf server.Config)
- func (a *AlarmServerComponent) Status() server.Status
- func (a *AlarmServerComponent) Sync(ctx context.Context, syncInfo alertingSync.SyncInfo) error
- func (a *AlarmServerComponent) SyncRules(ctx context.Context, rules *rules.RuleManifest) (*emptypb.Empty, error)
- func (a *AlarmServerComponent) Timeline(ctx context.Context, req *alertingv1.TimelineRequest) (*alertingv1.TimelineResponse, error)
- func (a *AlarmServerComponent) UpdateAlertCondition(ctx context.Context, req *alertingv1.UpdateAlertConditionRequest) (*emptypb.Empty, error)
- type AlarmServerConfiguration
- type EvaluatorContext
- type InternalConditionEvaluator
- func (c *InternalConditionEvaluator[T]) CalculateInitialState()
- func (c *InternalConditionEvaluator[T]) EvaluateLoop()
- func (c *InternalConditionEvaluator[T]) IsFiring() bool
- func (c *InternalConditionEvaluator[T]) SetFiring(firing bool)
- func (c *InternalConditionEvaluator[T]) SubscriberLoop()
- func (c *InternalConditionEvaluator[T]) UpdateState(ctx context.Context, s *alertingv1.CachedState) error
- type Runner
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewAgentDurableReplayConsumer ¶
func NewAgentDurableReplayConsumer(clusterId string) *nats.ConsumerConfig
func NewAgentStream ¶
func NewAgentStream() *nats.StreamConfig
func NewAgentStreamSubject ¶
func NewCortexStatusStream ¶
func NewCortexStatusStream() *nats.StreamConfig
func NewCortexStatusSubject ¶
func NewCortexStatusSubject() string
Types ¶
type AlarmMetricsExporter ¶ added in v0.11.0
type AlarmMetricsExporter struct {
// contains filtered or unexported fields
}
func NewAlarmMetricsExporter ¶ added in v0.11.0
func NewAlarmMetricsExporter() *AlarmMetricsExporter
type AlarmServerComponent ¶
type AlarmServerComponent struct { alertingv1.UnsafeAlertConditionsServer rules.UnsafeRuleSyncServer util.Initializer server.Config // contains filtered or unexported fields }
func NewAlarmServerComponent ¶
func NewAlarmServerComponent( ctx context.Context, logger *slog.Logger, notifications *notifications.NotificationServerComponent, ) *AlarmServerComponent
func (*AlarmServerComponent) ActivateSilence ¶
func (a *AlarmServerComponent) ActivateSilence(ctx context.Context, req *alertingv1.SilenceRequest) (*emptypb.Empty, error)
func (*AlarmServerComponent) AlertConditionStatus ¶
func (a *AlarmServerComponent) AlertConditionStatus(ctx context.Context, ref *alertingv1.ConditionReference) (*alertingv1.AlertStatusResponse, error)
func (*AlarmServerComponent) CloneTo ¶
func (a *AlarmServerComponent) CloneTo(ctx context.Context, req *alertingv1.CloneToRequest) (*emptypb.Empty, error)
func (*AlarmServerComponent) CreateAlertCondition ¶
func (a *AlarmServerComponent) CreateAlertCondition(ctx context.Context, req *alertingv1.AlertCondition) (*alertingv1.ConditionReference, error)
func (*AlarmServerComponent) DeactivateSilence ¶
func (a *AlarmServerComponent) DeactivateSilence(ctx context.Context, ref *alertingv1.ConditionReference) (*emptypb.Empty, error)
func (*AlarmServerComponent) DeleteAlertCondition ¶
func (a *AlarmServerComponent) DeleteAlertCondition(ctx context.Context, ref *alertingv1.ConditionReference) (*emptypb.Empty, error)
func (*AlarmServerComponent) GetAlertCondition ¶
func (a *AlarmServerComponent) GetAlertCondition(ctx context.Context, ref *alertingv1.ConditionReference) (*alertingv1.AlertCondition, error)
func (*AlarmServerComponent) Healthy ¶ added in v0.11.0
func (a *AlarmServerComponent) Healthy() bool
func (*AlarmServerComponent) Initialize ¶
func (a *AlarmServerComponent) Initialize(conf AlarmServerConfiguration)
func (*AlarmServerComponent) ListAlertConditionChoices ¶
func (a *AlarmServerComponent) ListAlertConditionChoices(ctx context.Context, req *alertingv1.AlertDetailChoicesRequest) (*alertingv1.ListAlertTypeDetails, error)
func (*AlarmServerComponent) ListAlertConditionGroups ¶ added in v0.11.0
func (a *AlarmServerComponent) ListAlertConditionGroups(ctx context.Context, _ *emptypb.Empty) (*corev1.ReferenceList, error)
func (*AlarmServerComponent) ListAlertConditions ¶
func (a *AlarmServerComponent) ListAlertConditions(ctx context.Context, req *alertingv1.ListAlertConditionRequest) (*alertingv1.AlertConditionList, error)
func (*AlarmServerComponent) ListAlertConditionsWithStatus ¶
func (a *AlarmServerComponent) ListAlertConditionsWithStatus(ctx context.Context, req *alertingv1.ListStatusRequest) (*alertingv1.ListStatusResponse, error)
func (*AlarmServerComponent) Name ¶ added in v0.11.0
func (a *AlarmServerComponent) Name() string
func (*AlarmServerComponent) Ready ¶ added in v0.11.0
func (a *AlarmServerComponent) Ready() bool
func (*AlarmServerComponent) SetConfig ¶
func (a *AlarmServerComponent) SetConfig(conf server.Config)
func (*AlarmServerComponent) Status ¶
func (a *AlarmServerComponent) Status() server.Status
func (*AlarmServerComponent) Sync ¶
func (a *AlarmServerComponent) Sync(ctx context.Context, syncInfo alertingSync.SyncInfo) error
func (*AlarmServerComponent) SyncRules ¶ added in v0.11.0
func (a *AlarmServerComponent) SyncRules(ctx context.Context, rules *rules.RuleManifest) (*emptypb.Empty, error)
func (*AlarmServerComponent) Timeline ¶
func (a *AlarmServerComponent) Timeline(ctx context.Context, req *alertingv1.TimelineRequest) (*alertingv1.TimelineResponse, error)
func (*AlarmServerComponent) UpdateAlertCondition ¶
func (a *AlarmServerComponent) UpdateAlertCondition(ctx context.Context, req *alertingv1.UpdateAlertConditionRequest) (*emptypb.Empty, error)
type AlarmServerConfiguration ¶
type AlarmServerConfiguration struct { spec.ConditionStorage spec.IncidentStorage spec.StateStorage spec.RouterStorage Js nats.JetStreamContext MgmtClient managementv1.ManagementClient AdminClient cortexadmin.CortexAdminClient CortexOpsClient cortexops.CortexOpsClient }
type EvaluatorContext ¶
type EvaluatorContext struct { Ctx context.Context Cancel context.CancelFunc // contains filtered or unexported fields }
type InternalConditionEvaluator ¶
type InternalConditionEvaluator[T proto.Message] struct { // contains filtered or unexported fields }
--------------------------------
func NewInternalConditionEvaluator ¶
func NewInternalConditionEvaluator[T proto.Message]( metadata *internalConditionMetadata, context *internalConditionContext, storage *internalConditionStorage, state *internalConditionState, hooks *internalConditionHooks[T], ) *InternalConditionEvaluator[T]
func (*InternalConditionEvaluator[T]) CalculateInitialState ¶
func (c *InternalConditionEvaluator[T]) CalculateInitialState()
func (*InternalConditionEvaluator[T]) EvaluateLoop ¶
func (c *InternalConditionEvaluator[T]) EvaluateLoop()
infinite & blocking : must be run in a goroutine
func (*InternalConditionEvaluator[T]) IsFiring ¶
func (c *InternalConditionEvaluator[T]) IsFiring() bool
func (*InternalConditionEvaluator[T]) SetFiring ¶
func (c *InternalConditionEvaluator[T]) SetFiring(firing bool)
func (*InternalConditionEvaluator[T]) SubscriberLoop ¶
func (c *InternalConditionEvaluator[T]) SubscriberLoop()
infinite & blocking : must be run in a goroutine
func (*InternalConditionEvaluator[T]) UpdateState ¶
func (c *InternalConditionEvaluator[T]) UpdateState(ctx context.Context, s *alertingv1.CachedState) error
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) AddSystemConfigListener ¶
func (n *Runner) AddSystemConfigListener(conditionId string, eCtx *EvaluatorContext)
func (*Runner) RemoveConfigListener ¶
Click to show internal directories.
Click to hide internal directories.