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 NewFlagTrackerImpl(broadcaster *FlagChangeEventBroadcaster, ...) interfaces.FlagTracker
- type AtomicBoolean
- type BigSegmentStoreStatusBroadcaster
- func (b *BigSegmentStoreStatusBroadcaster) AddListener() <-chan interfaces.BigSegmentStoreStatus
- func (b *BigSegmentStoreStatusBroadcaster) Broadcast(value interfaces.BigSegmentStoreStatus)
- func (b *BigSegmentStoreStatusBroadcaster) Close()
- func (b *BigSegmentStoreStatusBroadcaster) RemoveListener(ch <-chan interfaces.BigSegmentStoreStatus)
- type ClientContextImpl
- 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 LoggingConfigurationImpl
Constants ¶
const SDKVersion = "5.10.1"
SDKVersion is the current version string of the SDK. This is updated by our release scripts.
Variables ¶
This section is empty.
Functions ¶
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 AtomicBoolean ¶ added in v5.10.0
type AtomicBoolean struct {
// contains filtered or unexported fields
}
AtomicBoolean is a simple atomic boolean type based on sync/atomic. Since sync/atomic supports only integer types, the implementation uses an int32.
func (*AtomicBoolean) Get ¶ added in v5.10.0
func (a *AtomicBoolean) Get() bool
Get returns the current value.
func (*AtomicBoolean) GetAndSet ¶ added in v5.10.0
func (a *AtomicBoolean) GetAndSet(value bool) bool
GetAndSet atomically updates the value and returns the previous value.
func (*AtomicBoolean) Set ¶ added in v5.10.0
func (a *AtomicBoolean) Set(value bool)
Set updates the value.
type BigSegmentStoreStatusBroadcaster ¶ added in v5.5.0
type BigSegmentStoreStatusBroadcaster struct {
// contains filtered or unexported fields
}
BigSegmentStoreStatusBroadcaster is the internal implementation of publish-subscribe for BigSegmentStoreStatus values.
func NewBigSegmentStoreStatusBroadcaster ¶ added in v5.5.0
func NewBigSegmentStoreStatusBroadcaster() *BigSegmentStoreStatusBroadcaster
NewBigSegmentStoreStatusBroadcaster creates an instance of BigSegmentStoreStatusBroadcaster.
func (*BigSegmentStoreStatusBroadcaster) AddListener ¶ added in v5.5.0
func (b *BigSegmentStoreStatusBroadcaster) AddListener() <-chan interfaces.BigSegmentStoreStatus
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 (*BigSegmentStoreStatusBroadcaster) Broadcast ¶ added in v5.5.0
func (b *BigSegmentStoreStatusBroadcaster) Broadcast(value interfaces.BigSegmentStoreStatus)
Broadcast broadcasts a new value to the registered listeners, if any.
func (*BigSegmentStoreStatusBroadcaster) Close ¶ added in v5.5.0
func (b *BigSegmentStoreStatusBroadcaster) Close()
Close closes all currently registered listener channels.
func (*BigSegmentStoreStatusBroadcaster) RemoveListener ¶ added in v5.5.0
func (b *BigSegmentStoreStatusBroadcaster) RemoveListener(ch <-chan interfaces.BigSegmentStoreStatus)
RemoveListener stops broadcasting to a channel that was created with AddListener.
type ClientContextImpl ¶ added in v5.8.0
type ClientContextImpl struct { // Used internally to share a diagnosticsManager instance between components. DiagnosticsManager *ldevents.DiagnosticsManager // contains filtered or unexported fields }
ClientContextImpl is the SDK's standard implementation of interfaces.ClientContext.
func NewClientContextImpl ¶
func NewClientContextImpl( basic interfaces.BasicConfiguration, http interfaces.HTTPConfiguration, logging interfaces.LoggingConfiguration, ) *ClientContextImpl
NewClientContextImpl creates the SDK's standard implementation of interfaces.ClientContext.
func (*ClientContextImpl) GetBasic ¶ added in v5.8.0
func (c *ClientContextImpl) GetBasic() interfaces.BasicConfiguration
func (*ClientContextImpl) GetHTTP ¶ added in v5.8.0
func (c *ClientContextImpl) GetHTTP() interfaces.HTTPConfiguration
func (*ClientContextImpl) GetLogging ¶ added in v5.8.0
func (c *ClientContextImpl) GetLogging() interfaces.LoggingConfiguration
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 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 bigsegments is an internal package containing implementation details for the SDK's Big Segment functionality, not including the part that is in go-server-sdk-evaluation.
|
Package bigsegments is an internal package containing implementation details for the SDK's Big Segment functionality, not including the part that is in go-server-sdk-evaluation. |
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 endpoints contains internal constants and functions for computing service endpoint URIs.
|
Package endpoints contains internal constants and functions for computing service endpoint URIs. |
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. |