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 ¶
const SDKVersion = "6.1.0"
SDKVersion is the current version string of the SDK. This is updated by our release scripts.
Variables ¶
This section is empty.
Functions ¶
func LogErrorNilPointerMethod ¶
func LogErrorNilPointerMethod(typeName string)
LogErrorNilPointerMethod prints a message to os.Stderr to indicate that the application tried to call a method on a nil pointer receiver.
func NewFlagTrackerImpl ¶
func NewFlagTrackerImpl( broadcaster *Broadcaster[interfaces.FlagChangeEvent], evaluateFn func(flagKey string, context ldcontext.Context, defaultValue ldvalue.Value) ldvalue.Value, ) interfaces.FlagTracker
NewFlagTrackerImpl creates the internal implementation of FlagTracker.
Types ¶
type AtomicBoolean ¶
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. (Note: we should be able to get rid of this once our minimum Go version becomes 1.19 or higher.)
func (*AtomicBoolean) GetAndSet ¶
func (a *AtomicBoolean) GetAndSet(value bool) bool
GetAndSet atomically updates the value and returns the previous value.
type Broadcaster ¶
type Broadcaster[V any] struct { // contains filtered or unexported fields }
Broadcaster is our generalized implementation of broadcasters.
func NewBroadcaster ¶
func NewBroadcaster[V any]() *Broadcaster[V]
NewBroadcaster creates a Broadcaster that operates on the specified value type.
func (*Broadcaster[V]) AddListener ¶
func (b *Broadcaster[V]) AddListener() <-chan V
AddListener adds a subscriber and returns a channel for it to receive values.
func (*Broadcaster[V]) Broadcast ¶
func (b *Broadcaster[V]) Broadcast(value V)
Broadcast broadcasts a value to all current subscribers.
func (*Broadcaster[V]) Close ¶
func (b *Broadcaster[V]) Close()
Close closes all current subscriber channels.
func (*Broadcaster[V]) HasListeners ¶
func (b *Broadcaster[V]) HasListeners() bool
HasListeners returns true if there are any current subscribers.
func (*Broadcaster[V]) RemoveListener ¶
func (b *Broadcaster[V]) RemoveListener(ch <-chan V)
RemoveListener removes a subscriber. The parameter is the same channel that was returned by AddListener.
type ClientContextImpl ¶
type ClientContextImpl struct { subsystems.BasicClientContext // Used internally to share a diagnosticsManager instance between components. DiagnosticsManager *ldevents.DiagnosticsManager }
ClientContextImpl is the SDK's standard implementation of interfaces.ClientContext.
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. |
mocks
Package mocks contains mocks/spies used within SDK unit tests.
|
Package mocks contains mocks/spies used within SDK unit tests. |