Documentation ¶
Index ¶
- 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 AlarmServerComponent
- func (a *AlarmServerComponent) ActivateSilence(ctx context.Context, req *alertingv1.SilenceRequest) (*emptypb.Empty, error)
- func (a *AlarmServerComponent) AlertConditionStatus(ctx context.Context, ref *corev1.Reference) (*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) (*corev1.Reference, error)
- func (a *AlarmServerComponent) DeactivateSilence(ctx context.Context, ref *corev1.Reference) (*emptypb.Empty, error)
- func (a *AlarmServerComponent) DeleteAlertCondition(ctx context.Context, ref *corev1.Reference) (*emptypb.Empty, error)
- func (a *AlarmServerComponent) GetAlertCondition(ctx context.Context, ref *corev1.Reference) (*alertingv1.AlertCondition, error)
- func (a *AlarmServerComponent) Initialize(conf AlarmServerConfiguration)
- func (a *AlarmServerComponent) ListAlertConditionChoices(ctx context.Context, req *alertingv1.AlertDetailChoicesRequest) (*alertingv1.ListAlertTypeDetails, 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) SetConfig(conf struct{})
- func (a *AlarmServerComponent) Status() struct{}
- func (a *AlarmServerComponent) Sync(enabled bool) 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 ¶
This section is empty.
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 AlarmServerComponent ¶
type AlarmServerComponent struct { alertingv1.UnsafeAlertConditionsServer util.Initializer // contains filtered or unexported fields }
func NewAlarmServerComponent ¶
func NewAlarmServerComponent( ctx context.Context, logger *zap.SugaredLogger, 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 *corev1.Reference) (*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) (*corev1.Reference, error)
func (*AlarmServerComponent) DeactivateSilence ¶
func (*AlarmServerComponent) DeleteAlertCondition ¶
func (*AlarmServerComponent) GetAlertCondition ¶
func (a *AlarmServerComponent) GetAlertCondition(ctx context.Context, ref *corev1.Reference) (*alertingv1.AlertCondition, error)
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) 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) SetConfig ¶
func (a *AlarmServerComponent) SetConfig(conf struct{})
func (*AlarmServerComponent) Status ¶
func (a *AlarmServerComponent) Status() struct{}
func (*AlarmServerComponent) Sync ¶
func (a *AlarmServerComponent) Sync(enabled bool) 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 { storage.ConditionStorage storage.IncidentStorage storage.StateStorage storage.RouterStorage OpsNode *ops.AlertingOpsNode 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.