func NewDataSourceStatusProviderImpl( broadcaster *internal.Broadcaster[interfaces.DataSourceStatus], dataSourceUpdates *DataSourceUpdateSinkImpl, ) interfaces.DataSourceStatusProvider
NewDataSourceStatusProviderImpl creates the internal implementation of DataSourceStatusProvider.
func NewNullDataSource() subsystems.DataSource
NewNullDataSource returns a stub implementation of DataSource.
DataSourceUpdateSinkImpl is the internal implementation of DataSourceUpdateSink. It is exported because the actual implementation type, rather than the interface, is required as a dependency of other SDK components.
type DataSourceUpdateSinkImpl struct {
// contains filtered or unexported fields
}
func NewDataSourceUpdateSinkImpl( store subsystems.DataStore, dataStoreStatusProvider intf.DataStoreStatusProvider, dataSourceStatusBroadcaster *internal.Broadcaster[intf.DataSourceStatus], flagChangeEventBroadcaster *internal.Broadcaster[intf.FlagChangeEvent], logDataSourceOutageAsErrorAfter time.Duration, loggers ldlog.Loggers, ) *DataSourceUpdateSinkImpl
NewDataSourceUpdateSinkImpl creates the internal implementation of DataSourceUpdateSink.
func (d *DataSourceUpdateSinkImpl) GetDataStoreStatusProvider() intf.DataStoreStatusProvider
func (d *DataSourceUpdateSinkImpl) GetLastStatus() intf.DataSourceStatus
GetLastStatus is used internally by SDK components.
func (d *DataSourceUpdateSinkImpl) Init(allData []st.Collection) bool
func (d *DataSourceUpdateSinkImpl) UpdateStatus( newState intf.DataSourceState, newError intf.DataSourceErrorInfo, )
func (d *DataSourceUpdateSinkImpl) Upsert( kind st.DataKind, key string, item st.ItemDescriptor, ) bool
PollingProcessor is the internal implementation of the polling data source.
This type is exported from internal so that the PollingDataSourceBuilder tests can verify its configuration. All other code outside of this package should interact with it only via the DataSource interface.
type PollingProcessor struct {
// contains filtered or unexported fields
}
func NewPollingProcessor( context subsystems.ClientContext, dataSourceUpdates subsystems.DataSourceUpdateSink, baseURI string, pollInterval time.Duration, ) *PollingProcessor
NewPollingProcessor creates the internal implementation of the polling data source.
func (pp *PollingProcessor) Close() error
func (pp *PollingProcessor) GetBaseURI() string
GetBaseURI returns the configured polling base URI, for testing.
func (pp *PollingProcessor) GetPollInterval() time.Duration
GetPollInterval returns the configured polling interval, for testing.
func (pp *PollingProcessor) IsInitialized() bool
func (pp *PollingProcessor) Start(closeWhenReady chan<- struct{})
StreamProcessor is the internal implementation of the streaming data source.
This type is exported from internal so that the StreamingDataSourceBuilder tests can verify its configuration. All other code outside of this package should interact with it only via the DataSource interface.
type StreamProcessor struct {
// contains filtered or unexported fields
}
func NewStreamProcessor( context subsystems.ClientContext, dataSourceUpdates subsystems.DataSourceUpdateSink, streamURI string, initialReconnectDelay time.Duration, ) *StreamProcessor
NewStreamProcessor creates the internal implementation of the streaming data source.
func (sp *StreamProcessor) Close() error
func (sp *StreamProcessor) GetBaseURI() string
GetBaseURI returns the configured streaming base URI, for testing.
func (sp *StreamProcessor) GetInitialReconnectDelay() time.Duration
GetInitialReconnectDelay returns the configured reconnect delay, for testing.
func (sp *StreamProcessor) IsInitialized() bool
func (sp *StreamProcessor) Start(closeWhenReady chan<- struct{})