SDKVersion is the current version string of the SDK. This is updated by our release scripts.
const SDKVersion = "6.0.3"
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( 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.
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.)
type AtomicBoolean struct {
// contains filtered or unexported fields
}
func (a *AtomicBoolean) Get() bool
Get returns the current value.
func (a *AtomicBoolean) GetAndSet(value bool) bool
GetAndSet atomically updates the value and returns the previous value.
func (a *AtomicBoolean) Set(value bool)
Set updates the value.
Broadcaster is our generalized implementation of broadcasters.
type Broadcaster[V any] struct { // contains filtered or unexported fields }
func NewBroadcaster[V any]() *Broadcaster[V]
NewBroadcaster creates a Broadcaster that operates on the specified value type.
func (b *Broadcaster[V]) AddListener() <-chan V
AddListener adds a subscriber and returns a channel for it to receive values.
func (b *Broadcaster[V]) Broadcast(value V)
Broadcast broadcasts a value to all current subscribers.
func (b *Broadcaster[V]) Close()
Close closes all current subscriber channels.
func (b *Broadcaster[V]) HasListeners() bool
HasListeners returns true if there are any current subscribers.
func (b *Broadcaster[V]) RemoveListener(ch <-chan V)
RemoveListener removes a subscriber. The parameter is the same channel that was returned by AddListener.
ClientContextImpl is the SDK's standard implementation of interfaces.ClientContext.
type ClientContextImpl struct { subsystems.BasicClientContext // Used internally to share a diagnosticsManager instance between components. DiagnosticsManager *ldevents.DiagnosticsManager }
Name | Synopsis |
---|---|
.. |