Documentation ¶
Overview ¶
Package internal contains SDK implementation details that are shared between packages, but are not exposed to application code. The datasource and datastore subpackages contain implementation components specific to their areas of functionality.
Index ¶
- Constants
- func NewClientContextImpl(sdkKey string, http interfaces.HTTPConfiguration, ...) interfaces.ClientContext
- func NewFlagTrackerImpl(broadcaster *FlagChangeEventBroadcaster, ...) interfaces.FlagTracker
- type DataSourceStatusBroadcaster
- func (b *DataSourceStatusBroadcaster) AddListener() <-chan interfaces.DataSourceStatus
- func (b *DataSourceStatusBroadcaster) Broadcast(value interfaces.DataSourceStatus)
- func (b *DataSourceStatusBroadcaster) Close()
- func (b *DataSourceStatusBroadcaster) RemoveListener(ch <-chan interfaces.DataSourceStatus)
- type DataStoreStatusBroadcaster
- func (b *DataStoreStatusBroadcaster) AddListener() <-chan interfaces.DataStoreStatus
- func (b *DataStoreStatusBroadcaster) Broadcast(value interfaces.DataStoreStatus)
- func (b *DataStoreStatusBroadcaster) Close()
- func (b *DataStoreStatusBroadcaster) RemoveListener(ch <-chan interfaces.DataStoreStatus)
- type FlagChangeEventBroadcaster
- func (b *FlagChangeEventBroadcaster) AddListener() <-chan interfaces.FlagChangeEvent
- func (b *FlagChangeEventBroadcaster) Broadcast(value interfaces.FlagChangeEvent)
- func (b *FlagChangeEventBroadcaster) Close()
- func (b *FlagChangeEventBroadcaster) HasListeners() bool
- func (b *FlagChangeEventBroadcaster) RemoveListener(ch <-chan interfaces.FlagChangeEvent)
- type HTTPConfigurationImpl
- type HasDiagnosticsManager
- type LoggingConfigurationImpl
Constants ¶
const SDKVersion = "5.0.2"
SDKVersion is the current version string of the SDK. This is updated by our release scripts.
Variables ¶
This section is empty.
Functions ¶
func NewClientContextImpl ¶
func NewClientContextImpl( sdkKey string, http interfaces.HTTPConfiguration, logging interfaces.LoggingConfiguration, offline bool, diagnosticsManager *ldevents.DiagnosticsManager, ) interfaces.ClientContext
NewClientContextImpl creates the SDK's standard implementation of interfaces.ClientContext.
func NewFlagTrackerImpl ¶
func NewFlagTrackerImpl( broadcaster *FlagChangeEventBroadcaster, evaluateFn func(flagKey string, user lduser.User, defaultValue ldvalue.Value) ldvalue.Value, ) interfaces.FlagTracker
NewFlagTrackerImpl creates the internal implementation of FlagTracker.
Types ¶
type DataSourceStatusBroadcaster ¶
type DataSourceStatusBroadcaster struct {
// contains filtered or unexported fields
}
DataSourceStatusBroadcaster is the internal implementation of publish-subscribe for DataSourceStatus values.
func NewDataSourceStatusBroadcaster ¶
func NewDataSourceStatusBroadcaster() *DataSourceStatusBroadcaster
NewDataSourceStatusBroadcaster creates an instance of DataSourceStatusBroadcaster.
func (*DataSourceStatusBroadcaster) AddListener ¶
func (b *DataSourceStatusBroadcaster) AddListener() <-chan interfaces.DataSourceStatus
AddListener creates a new channel for listening to broadcast values. This is created with a small channel buffer, but it is the consumer's responsibility to consume the channel to avoid blocking an SDK goroutine.
func (*DataSourceStatusBroadcaster) Broadcast ¶
func (b *DataSourceStatusBroadcaster) Broadcast(value interfaces.DataSourceStatus)
Broadcast broadcasts a new value to the registered listeners, if any.
func (*DataSourceStatusBroadcaster) Close ¶
func (b *DataSourceStatusBroadcaster) Close()
Close closes all currently registered listener channels.
func (*DataSourceStatusBroadcaster) RemoveListener ¶
func (b *DataSourceStatusBroadcaster) RemoveListener(ch <-chan interfaces.DataSourceStatus)
RemoveListener stops broadcasting to a channel that was created with AddListener.
type DataStoreStatusBroadcaster ¶
type DataStoreStatusBroadcaster struct {
// contains filtered or unexported fields
}
DataStoreStatusBroadcaster is the internal implementation of publish-subscribe for DataStoreStatus values.
func NewDataStoreStatusBroadcaster ¶
func NewDataStoreStatusBroadcaster() *DataStoreStatusBroadcaster
NewDataStoreStatusBroadcaster creates an instance of DataStoreStatusBroadcaster.
func (*DataStoreStatusBroadcaster) AddListener ¶
func (b *DataStoreStatusBroadcaster) AddListener() <-chan interfaces.DataStoreStatus
AddListener creates a new channel for listening to broadcast values. This is created with a small channel buffer, but it is the consumer's responsibility to consume the channel to avoid blocking an SDK goroutine.
func (*DataStoreStatusBroadcaster) Broadcast ¶
func (b *DataStoreStatusBroadcaster) Broadcast(value interfaces.DataStoreStatus)
Broadcast broadcasts a new value to the registered listeners, if any.
func (*DataStoreStatusBroadcaster) Close ¶
func (b *DataStoreStatusBroadcaster) Close()
Close closes all currently registered listener channels.
func (*DataStoreStatusBroadcaster) RemoveListener ¶
func (b *DataStoreStatusBroadcaster) RemoveListener(ch <-chan interfaces.DataStoreStatus)
RemoveListener stops broadcasting to a channel that was created with AddListener.
type FlagChangeEventBroadcaster ¶
type FlagChangeEventBroadcaster struct {
// contains filtered or unexported fields
}
FlagChangeEventBroadcaster is the internal implementation of publish-subscribe for FlagChangeEvent values.
func NewFlagChangeEventBroadcaster ¶
func NewFlagChangeEventBroadcaster() *FlagChangeEventBroadcaster
NewFlagChangeEventBroadcaster creates an instance of FlagChangeEventBroadcaster.
func (*FlagChangeEventBroadcaster) AddListener ¶
func (b *FlagChangeEventBroadcaster) AddListener() <-chan interfaces.FlagChangeEvent
AddListener creates a new channel for listening to broadcast values. This is created with a small channel buffer, but it is the consumer's responsibility to consume the channel to avoid blocking an SDK goroutine.
func (*FlagChangeEventBroadcaster) Broadcast ¶
func (b *FlagChangeEventBroadcaster) Broadcast(value interfaces.FlagChangeEvent)
Broadcast broadcasts a new value to the registered listeners, if any.
func (*FlagChangeEventBroadcaster) Close ¶
func (b *FlagChangeEventBroadcaster) Close()
Close closes all currently registered listener channels.
func (*FlagChangeEventBroadcaster) HasListeners ¶
func (b *FlagChangeEventBroadcaster) HasListeners() bool
HasListeners returns true if any listeners are registered.
func (*FlagChangeEventBroadcaster) RemoveListener ¶
func (b *FlagChangeEventBroadcaster) RemoveListener(ch <-chan interfaces.FlagChangeEvent)
RemoveListener stops broadcasting to a channel that was created with AddListener.
type HTTPConfigurationImpl ¶
type HTTPConfigurationImpl struct { DefaultHeaders http.Header HTTPClientFactory func() *http.Client }
HTTPConfigurationImpl is the internal implementation of HTTPConfiguration.
func (HTTPConfigurationImpl) CreateHTTPClient ¶
func (c HTTPConfigurationImpl) CreateHTTPClient() *http.Client
func (HTTPConfigurationImpl) GetDefaultHeaders ¶
func (c HTTPConfigurationImpl) GetDefaultHeaders() http.Header
type HasDiagnosticsManager ¶
type HasDiagnosticsManager interface {
GetDiagnosticsManager() *ldevents.DiagnosticsManager
}
HasDiagnosticsManager is an interface that is implemented only by the SDK's own ClientContext implementation, to allow component factories to access the DiagnosticsManager.
type LoggingConfigurationImpl ¶
type LoggingConfigurationImpl struct { LogDataSourceOutageAsErrorAfter time.Duration LogEvaluationErrors bool LogUserKeyInErrors bool Loggers ldlog.Loggers }
LoggingConfigurationImpl is the internal implementation of LoggingConfiguration.
func (LoggingConfigurationImpl) GetLogDataSourceOutageAsErrorAfter ¶
func (c LoggingConfigurationImpl) GetLogDataSourceOutageAsErrorAfter() time.Duration
func (LoggingConfigurationImpl) GetLoggers ¶
func (c LoggingConfigurationImpl) GetLoggers() ldlog.Loggers
func (LoggingConfigurationImpl) IsLogEvaluationErrors ¶
func (c LoggingConfigurationImpl) IsLogEvaluationErrors() bool
func (LoggingConfigurationImpl) IsLogUserKeyInErrors ¶
func (c LoggingConfigurationImpl) IsLogUserKeyInErrors() bool
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package datakinds contains the implementations of ldstoretypes.DataKind for flags and segments.
|
Package datakinds contains the implementations of ldstoretypes.DataKind for flags and segments. |
Package datasource is an internal package containing implementation types for the SDK's data source implementations (streaming, polling, etc.) and related functionality.
|
Package datasource is an internal package containing implementation types for the SDK's data source implementations (streaming, polling, etc.) and related functionality. |
Package datastore is an internal package containing implementation types for the SDK's data store implementations (in-memory vs.
|
Package datastore is an internal package containing implementation types for the SDK's data store implementations (in-memory vs. |
Package sharedtest contains types and functions used by SDK unit tests in multiple packages.
|
Package sharedtest contains types and functions used by SDK unit tests in multiple packages. |