Documentation ¶
Overview ¶
Package datastore is an internal package containing implementation types for the SDK's data store implementations (in-memory vs. cached persistent store) and related functionality. These types are not visible from outside of the SDK.
This does not include implementations of specific database integrations such as Redis. Those are implemented in separate repositories such as https://github.com/launchdarkly/go-server-sdk-redis-redigo.
Index ¶
- func NewDataStoreEvaluatorDataProviderImpl(store interfaces.DataStore, loggers ldlog.Loggers) ldeval.DataProvider
- func NewDataStoreStatusProviderImpl(store interfaces.DataStore, dataStoreUpdates *DataStoreUpdatesImpl) interfaces.DataStoreStatusProvider
- func NewInMemoryDataStore(loggers ldlog.Loggers) interfaces.DataStore
- func NewPersistentDataStoreWrapper(core intf.PersistentDataStore, dataStoreUpdates intf.DataStoreUpdates, ...) intf.DataStore
- type DataStoreUpdatesImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataStoreEvaluatorDataProviderImpl ¶
func NewDataStoreEvaluatorDataProviderImpl(store interfaces.DataStore, loggers ldlog.Loggers) ldeval.DataProvider
NewDataStoreEvaluatorDataProviderImpl creates the internal implementation of the adapter that connects the Evaluator (from go-server-sdk-evaluation) with the data store.
func NewDataStoreStatusProviderImpl ¶
func NewDataStoreStatusProviderImpl( store interfaces.DataStore, dataStoreUpdates *DataStoreUpdatesImpl, ) interfaces.DataStoreStatusProvider
NewDataStoreStatusProviderImpl creates the internal implementation of DataStoreStatusProvider.
func NewInMemoryDataStore ¶
func NewInMemoryDataStore(loggers ldlog.Loggers) interfaces.DataStore
NewInMemoryDataStore creates an instance of the in-memory data store. This is not part of the public API; it is always called through ldcomponents.inMemoryDataStore().
func NewPersistentDataStoreWrapper ¶
func NewPersistentDataStoreWrapper( core intf.PersistentDataStore, dataStoreUpdates intf.DataStoreUpdates, cacheTTL time.Duration, loggers ldlog.Loggers, ) intf.DataStore
NewPersistentDataStoreWrapper creates the implementation of DataStore that we use for all persistent data stores. This is not visible in the public API; it is always called through ldcomponents.PersistentDataStore().
Types ¶
type DataStoreUpdatesImpl ¶
type DataStoreUpdatesImpl struct {
// contains filtered or unexported fields
}
DataStoreUpdatesImpl is the internal implementation of DataStoreUpdates. It is exported because the actual implementation type, rather than the interface, is required as a dependency of other SDK components.
func NewDataStoreUpdatesImpl ¶
func NewDataStoreUpdatesImpl(broadcaster *internal.DataStoreStatusBroadcaster) *DataStoreUpdatesImpl
NewDataStoreUpdatesImpl creates the internal implementation of DataStoreUpdates.
func (*DataStoreUpdatesImpl) UpdateStatus ¶
func (d *DataStoreUpdatesImpl) UpdateStatus(newStatus interfaces.DataStoreStatus)
UpdateStatus is called from the data store to push a status update.