internal

package
v5.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

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

View Source
const SDKVersion = "5.9.0"

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 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

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

Broadcast broadcasts a new value to the registered listeners, if any.

func (*BigSegmentStoreStatusBroadcaster) Close added in v5.5.0

Close closes all currently registered listener channels.

func (*BigSegmentStoreStatusBroadcaster) RemoveListener added in v5.5.0

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

NewClientContextImpl creates the SDK's standard implementation of interfaces.ClientContext.

func (*ClientContextImpl) GetBasic added in v5.8.0

func (*ClientContextImpl) GetHTTP added in v5.8.0

func (*ClientContextImpl) GetLogging added in v5.8.0

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

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

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

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

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL