jetstream

package
v0.11.2-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

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 ConditionGroupManager added in v0.11.0

type ConditionGroupManager[T interfaces.AlertingSecret] struct {
	// contains filtered or unexported fields
}

func NewConditionGroupManager added in v0.11.0

func NewConditionGroupManager[T interfaces.AlertingSecret](
	store nats.KeyValue,
	defaultPath string,
	groupPathFunc func(groupId string) string,
	groupRe *regexp.Regexp,
) *ConditionGroupManager[T]

func (*ConditionGroupManager[T]) Group added in v0.11.0

func (m *ConditionGroupManager[T]) Group(groupId string) spec.AlertingSecretStorage[T]

func (*ConditionGroupManager[T]) ListGroups added in v0.11.0

func (m *ConditionGroupManager[T]) ListGroups(_ context.Context) ([]string, error)

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 (*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

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 (*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)

func (*JetStreamAlertingStorage[T]) ListKeys

func (j *JetStreamAlertingStorage[T]) ListKeys(_ context.Context) ([]string, error)

func (*JetStreamAlertingStorage[T]) Put

func (j *JetStreamAlertingStorage[T]) Put(_ context.Context, key string, value 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 (JetstreamRouterStore[T]) List

func (j JetstreamRouterStore[T]) List(ctx context.Context, opts ...storage_opts.RequestOption) ([]T, error)

func (JetstreamRouterStore[T]) ListKeys

func (j JetstreamRouterStore[T]) ListKeys(_ context.Context) ([]string, error)

func (JetstreamRouterStore[T]) Put

func (j JetstreamRouterStore[T]) Put(_ context.Context, key string, value T) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL