testclient

package
v9.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package testclient contains test helpers that reference the SDK-related packages. These are in sharedtest/testclient rather than just sharedtest so that sharedtest can be used by those packages without a circular reference.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientFactoryThatFails

func ClientFactoryThatFails(err error) sdks.ClientFactoryFunc

func CreateDummyClient

func CreateDummyClient(sdkKey config.SDKKey, sdkConfig ld.Config, timeout time.Duration) (sdks.LDClientContext, error)

func FakeHashForContext

func FakeHashForContext(context ldcontext.Context) string

func FakeLDClientFactory

func FakeLDClientFactory(shouldBeInitialized bool) sdks.ClientFactoryFunc

func FakeLDClientFactoryWithChannel

func FakeLDClientFactoryWithChannel(shouldBeInitialized bool, createdCh chan<- *FakeLDClient, changeSetCh <-chan subsystems.ChangeSet) sdks.ClientFactoryFunc

func RealLDClientFactoryWithChannel

func RealLDClientFactoryWithChannel(shouldBeInitialized bool, createdCh chan<- CapturedLDClient) sdks.ClientFactoryFunc

Types

type CapturedLDClient

type CapturedLDClient struct {
	Key    config.SDKKey
	Client sdks.LDClientContext
}

type FakeDataDestination

type FakeDataDestination struct {
	// contains filtered or unexported fields
}

func NewFakeDataDestination

func NewFakeDataDestination(store *FakeStore) *FakeDataDestination

func (*FakeDataDestination) Apply

func (d *FakeDataDestination) Apply(changeSet subsystems.ChangeSet)

func (*FakeDataDestination) ApplyDelta

func (d *FakeDataDestination) ApplyDelta(changes []subsystems.Change, selector subsystems.Selector, persist bool)

func (*FakeDataDestination) Selector

func (d *FakeDataDestination) Selector() subsystems.Selector

func (*FakeDataDestination) SetBasis

func (d *FakeDataDestination) SetBasis(changes []subsystems.Change, selector subsystems.Selector, persist bool)

type FakeLDClient

type FakeLDClient struct {
	Key     config.SDKKey
	CloseCh chan struct{}
	// contains filtered or unexported fields
}

func (*FakeLDClient) AwaitClose

func (c *FakeLDClient) AwaitClose(t *testing.T, timeout time.Duration)

func (*FakeLDClient) Close

func (c *FakeLDClient) Close() error

func (*FakeLDClient) GetDataSourceStatus

func (c *FakeLDClient) GetDataSourceStatus() interfaces.DataSourceStatus

func (*FakeLDClient) GetDataStoreStatus

func (c *FakeLDClient) GetDataStoreStatus() sdks.DataStoreStatusInfo

func (*FakeLDClient) Initialized

func (c *FakeLDClient) Initialized() bool

func (*FakeLDClient) SecureModeHash

func (c *FakeLDClient) SecureModeHash(context ldcontext.Context) string

func (*FakeLDClient) SetDataSourceStatus

func (c *FakeLDClient) SetDataSourceStatus(newStatus interfaces.DataSourceStatus)

type FakeStore

type FakeStore struct {
	// contains filtered or unexported fields
}

func NewFakeStore

func NewFakeStore(collections []ldstoretypes.Collection) *FakeStore

func (*FakeStore) Apply

func (s *FakeStore) Apply(changeSet subsystems.ChangeSet)

func (*FakeStore) Close

func (s *FakeStore) Close() error

func (*FakeStore) Get

func (*FakeStore) GetAll

func (*FakeStore) InvalidateClientSideState

func (s *FakeStore) InvalidateClientSideState()

func (*FakeStore) IsInitialized

func (s *FakeStore) IsInitialized() bool

func (*FakeStore) Selector

func (s *FakeStore) Selector() subsystems.Selector

Jump to

Keyboard shortcuts

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