testclient

package
v6.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 12 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 FakeHashForUser

func FakeHashForUser(user lduser.User) string

func FakeLDClientFactory

func FakeLDClientFactory(shouldBeInitialized bool) sdks.ClientFactoryFunc

func FakeLDClientFactoryWithChannel

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

func RealLDClientFactoryWithChannel added in v6.1.0

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

Types

type CapturedLDClient added in v6.1.0

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

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(user lduser.User) string

func (*FakeLDClient) SetDataSourceStatus

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

Jump to

Keyboard shortcuts

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