Documentation
¶
Index ¶
- type ESPublisher
- type SSERelayFeatureStore
- func (relay *SSERelayFeatureStore) All(kind ld.VersionedDataKind) (map[string]ld.VersionedData, error)
- func (relay *SSERelayFeatureStore) Delete(kind ld.VersionedDataKind, key string, version int) error
- func (relay *SSERelayFeatureStore) Get(kind ld.VersionedDataKind, key string) (ld.VersionedData, error)
- func (relay *SSERelayFeatureStore) Init(allData map[ld.VersionedDataKind]map[string]ld.VersionedData) error
- func (relay *SSERelayFeatureStore) Initialized() bool
- func (relay *SSERelayFeatureStore) Upsert(kind ld.VersionedDataKind, item ld.VersionedData) error
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, heartbeatInterval int) *SSERelayFeatureStore
NewSSERelayFeatureStore creates a new feature store that relays different kinds of updates
func (*SSERelayFeatureStore) All ¶
func (relay *SSERelayFeatureStore) All(kind ld.VersionedDataKind) (map[string]ld.VersionedData, error)
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 ¶
func (relay *SSERelayFeatureStore) Get(kind ld.VersionedDataKind, key string) (ld.VersionedData, error)
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
Click to show internal directories.
Click to hide internal directories.