store

package
v0.0.0-...-8dc4135 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ESPublisher

type ESPublisher interface {
	Publish(channels []string, event es.Event)
	PublishComment(channels []string, text string)
	Register(channel string, repo es.Repository)
}

ESPublisher defines an interface for publishing events to eventsource

type SSERelayFeatureStore

type SSERelayFeatureStore struct {
	// contains filtered or unexported fields
}

SSERelayFeatureStore is a feature store that relays updates to eventsource

func NewSSERelayFeatureStore

func NewSSERelayFeatureStore(apiKey string, allPublisher ESPublisher, flagsPublisher ESPublisher, pingPublisher ESPublisher,
	baseFeatureStore ld.FeatureStore, loggers ldlog.Loggers, heartbeatInterval int) *SSERelayFeatureStore

NewSSERelayFeatureStore creates a new feature store that relays different kinds of updates

func (*SSERelayFeatureStore) All

All returns all items in the feature store

func (*SSERelayFeatureStore) Delete

func (relay *SSERelayFeatureStore) Delete(kind ld.VersionedDataKind, key string, version int) error

Delete marks a single item as deleted in the feature store

func (*SSERelayFeatureStore) Get

Get returns a single item from the feature store

func (*SSERelayFeatureStore) Init

func (relay *SSERelayFeatureStore) Init(allData map[ld.VersionedDataKind]map[string]ld.VersionedData) error

Init initializes the feature store

func (*SSERelayFeatureStore) Initialized

func (relay *SSERelayFeatureStore) Initialized() bool

Initialized returns true after the feature store has been initialized the first time

func (*SSERelayFeatureStore) Upsert

func (relay *SSERelayFeatureStore) Upsert(kind ld.VersionedDataKind, item ld.VersionedData) error

Upsert inserts or updates a single item in the feature store

Jump to

Keyboard shortcuts

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