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 subsystems.DataStore, loggers ldlog.Loggers) ldeval.DataProvider
- func NewDataStoreStatusProviderImpl(store subsystems.DataStore, dataStoreUpdates *DataStoreUpdateSinkImpl) interfaces.DataStoreStatusProvider
- func NewInMemoryDataStore(loggers ldlog.Loggers) subsystems.DataStore
- func NewPersistentDataStoreWrapper(core subsystems.PersistentDataStore, ...) subsystems.DataStore
- type DataStoreUpdateSinkImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataStoreEvaluatorDataProviderImpl ¶
func NewDataStoreEvaluatorDataProviderImpl(store subsystems.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 subsystems.DataStore, dataStoreUpdates *DataStoreUpdateSinkImpl, ) interfaces.DataStoreStatusProvider
NewDataStoreStatusProviderImpl creates the internal implementation of DataStoreStatusProvider.
func NewInMemoryDataStore ¶
func NewInMemoryDataStore(loggers ldlog.Loggers) subsystems.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 subsystems.PersistentDataStore, dataStoreUpdates subsystems.DataStoreUpdateSink, cacheTTL time.Duration, loggers ldlog.Loggers, ) subsystems.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 DataStoreUpdateSinkImpl ¶
type DataStoreUpdateSinkImpl struct {
// contains filtered or unexported fields
}
DataStoreUpdateSinkImpl is the internal implementation of DataStoreUpdateSink. It is exported because the actual implementation type, rather than the interface, is required as a dependency of other SDK components.
func NewDataStoreUpdateSinkImpl ¶
func NewDataStoreUpdateSinkImpl( broadcaster *internal.Broadcaster[interfaces.DataStoreStatus], ) *DataStoreUpdateSinkImpl
NewDataStoreUpdateSinkImpl creates the internal implementation of DataStoreUpdateSink.
func (*DataStoreUpdateSinkImpl) UpdateStatus ¶
func (d *DataStoreUpdateSinkImpl) UpdateStatus(newStatus interfaces.DataStoreStatus)
UpdateStatus is called from the data store to push a status update.