Documentation ¶
Index ¶
- func NewConditionKeyStore(js nats.JetStreamContext) nats.KeyValue
- func NewEndpointKeyStore(js nats.JetStreamContext) nats.KeyValue
- func NewIncidentKeyStore(js nats.JetStreamContext) nats.KeyValue
- func NewRouterObjectStore(js nats.JetStreamContext) nats.ObjectStore
- func NewStatusCache(js nats.JetStreamContext) nats.KeyValue
- type JetStreamAlertingIncidentTracker
- func (j *JetStreamAlertingIncidentTracker) CloseInterval(ctx context.Context, conditionId, fingerprint string, ...) error
- func (j *JetStreamAlertingIncidentTracker) GetActiveWindowsFromIncidentTracker(ctx context.Context, conditionId string, start, end *timestamppb.Timestamp) ([]*alertingv1.ActiveWindow, error)
- func (j *JetStreamAlertingIncidentTracker) OpenInterval(ctx context.Context, conditionId, fingerprint string, ...) error
- type JetStreamAlertingStateCache
- func (j *JetStreamAlertingStateCache) Get(ctx context.Context, key string, opts ...storage_opts.RequestOption) (*alertingv1.CachedState, error)
- func (j *JetStreamAlertingStateCache) IsDiff(ctx context.Context, key string, incomingState *alertingv1.CachedState) bool
- func (j *JetStreamAlertingStateCache) LastKnownChange(ctx context.Context, key string) (*timestamppb.Timestamp, error)
- func (j *JetStreamAlertingStateCache) Put(ctx context.Context, key string, incomingState *alertingv1.CachedState) error
- type JetStreamAlertingStorage
- func (j *JetStreamAlertingStorage[T]) Delete(_ context.Context, key string) error
- func (j *JetStreamAlertingStorage[T]) Get(_ context.Context, key string, opts ...storage_opts.RequestOption) (T, error)
- func (j *JetStreamAlertingStorage[T]) Key(key string) string
- func (j *JetStreamAlertingStorage[T]) List(ctx context.Context, opts ...storage_opts.RequestOption) ([]T, error)
- func (j *JetStreamAlertingStorage[T]) ListKeys(_ context.Context) ([]string, error)
- func (j *JetStreamAlertingStorage[T]) Put(_ context.Context, key string, value T) error
- type JetstreamRouterStore
- func (j JetstreamRouterStore[T]) Delete(_ context.Context, key string) error
- func (j JetstreamRouterStore[T]) Get(_ context.Context, key string, opts ...storage_opts.RequestOption) (T, error)
- func (j JetstreamRouterStore[T]) List(ctx context.Context, opts ...storage_opts.RequestOption) ([]T, error)
- func (j JetstreamRouterStore[T]) ListKeys(_ context.Context) ([]string, error)
- func (j JetstreamRouterStore[T]) Put(_ context.Context, key string, value T) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConditionKeyStore ¶
func NewConditionKeyStore(js nats.JetStreamContext) nats.KeyValue
func NewEndpointKeyStore ¶
func NewEndpointKeyStore(js nats.JetStreamContext) nats.KeyValue
func NewIncidentKeyStore ¶
func NewIncidentKeyStore(js nats.JetStreamContext) nats.KeyValue
func NewRouterObjectStore ¶
func NewRouterObjectStore(js nats.JetStreamContext) nats.ObjectStore
func NewStatusCache ¶
func NewStatusCache(js nats.JetStreamContext) nats.KeyValue
Types ¶
type JetStreamAlertingIncidentTracker ¶
type JetStreamAlertingIncidentTracker struct { // storage.AlertingStorage[*alertingv1.IncidentIntervals] *JetStreamAlertingStorage[*alertingv1.IncidentIntervals] // contains filtered or unexported fields }
func NewJetStreamAlertingIncidentTracker ¶
func NewJetStreamAlertingIncidentTracker(kv nats.KeyValue, prefix string, ttl time.Duration) *JetStreamAlertingIncidentTracker
func (*JetStreamAlertingIncidentTracker) CloseInterval ¶
func (j *JetStreamAlertingIncidentTracker) CloseInterval(ctx context.Context, conditionId, fingerprint string, end *timestamppb.Timestamp) error
func (*JetStreamAlertingIncidentTracker) GetActiveWindowsFromIncidentTracker ¶
func (j *JetStreamAlertingIncidentTracker) GetActiveWindowsFromIncidentTracker( ctx context.Context, conditionId string, start, end *timestamppb.Timestamp, ) ([]*alertingv1.ActiveWindow, error)
func (*JetStreamAlertingIncidentTracker) OpenInterval ¶
func (j *JetStreamAlertingIncidentTracker) OpenInterval(ctx context.Context, conditionId, fingerprint string, start *timestamppb.Timestamp) error
type JetStreamAlertingStateCache ¶
type JetStreamAlertingStateCache struct { // storage.AlertingStorage[*alertingv1.CachedState] *JetStreamAlertingStorage[*alertingv1.CachedState] // contains filtered or unexported fields }
func NewJetStreamAlertingStateCache ¶
func NewJetStreamAlertingStateCache(kv nats.KeyValue, prefix string) *JetStreamAlertingStateCache
func (*JetStreamAlertingStateCache) Get ¶
func (j *JetStreamAlertingStateCache) Get(ctx context.Context, key string, opts ...storage_opts.RequestOption) (*alertingv1.CachedState, error)
func (*JetStreamAlertingStateCache) IsDiff ¶
func (j *JetStreamAlertingStateCache) IsDiff(ctx context.Context, key string, incomingState *alertingv1.CachedState) bool
func (*JetStreamAlertingStateCache) LastKnownChange ¶
func (j *JetStreamAlertingStateCache) LastKnownChange(ctx context.Context, key string) (*timestamppb.Timestamp, error)
func (*JetStreamAlertingStateCache) Put ¶
func (j *JetStreamAlertingStateCache) Put(ctx context.Context, key string, incomingState *alertingv1.CachedState) error
type JetStreamAlertingStorage ¶
type JetStreamAlertingStorage[T interfaces.AlertingSecret] struct { // contains filtered or unexported fields }
func NewJetStreamAlertingStorage ¶
func NewJetStreamAlertingStorage[T interfaces.AlertingSecret]( kv nats.KeyValue, basePath string, ) *JetStreamAlertingStorage[T]
func (*JetStreamAlertingStorage[T]) Delete ¶
func (j *JetStreamAlertingStorage[T]) Delete(_ context.Context, key string) error
func (*JetStreamAlertingStorage[T]) Get ¶
func (j *JetStreamAlertingStorage[T]) Get(_ context.Context, key string, opts ...storage_opts.RequestOption) (T, error)
func (*JetStreamAlertingStorage[T]) Key ¶
func (j *JetStreamAlertingStorage[T]) Key(key string) string
func (*JetStreamAlertingStorage[T]) List ¶
func (j *JetStreamAlertingStorage[T]) List(ctx context.Context, opts ...storage_opts.RequestOption) ([]T, error)
type JetstreamRouterStore ¶
type JetstreamRouterStore[T routing.OpniRouting] struct { // contains filtered or unexported fields }
func NewJetstreamRouterStore ¶
func NewJetstreamRouterStore(obj nats.ObjectStore, prefix string) *JetstreamRouterStore[routing.OpniRouting]
func (JetstreamRouterStore[T]) Delete ¶
func (j JetstreamRouterStore[T]) Delete(_ context.Context, key string) error
func (JetstreamRouterStore[T]) Get ¶
func (j JetstreamRouterStore[T]) Get(_ context.Context, key string, opts ...storage_opts.RequestOption) (T, error)
func (JetstreamRouterStore[T]) List ¶
func (j JetstreamRouterStore[T]) List(ctx context.Context, opts ...storage_opts.RequestOption) ([]T, error)
Click to show internal directories.
Click to hide internal directories.