1 package ldstoreimpl 2 3 import ( 4 "github.com/launchdarkly/go-sdk-common/v3/ldlog" 5 ldeval "github.com/launchdarkly/go-server-sdk-evaluation/v2" 6 "github.com/launchdarkly/go-server-sdk/v6/internal/datastore" 7 "github.com/launchdarkly/go-server-sdk/v6/subsystems" 8 ) 9 10 // This file contains the public API for creating the adapter that bridges Evaluator to DataStore. The 11 // actual implementation is in internal/datastore, but we expose it because it is helpful when we 12 // evaluate flags outside of the SDK in ld-relay. 13 14 // NewDataStoreEvaluatorDataProvider provides an adapter for using a DataStore with the Evaluator type 15 // in go-server-sdk-evaluation. 16 // 17 // Normal use of the SDK does not require this type. It is provided for use by other LaunchDarkly 18 // components that use DataStore and Evaluator separately from the SDK. 19 func NewDataStoreEvaluatorDataProvider(store subsystems.DataStore, loggers ldlog.Loggers) ldeval.DataProvider { 20 return datastore.NewDataStoreEvaluatorDataProviderImpl(store, loggers) 21 } 22