testclient

package
v8.4.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 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 FakeHashForContext

func FakeHashForContext(context ldcontext.Context) string

func FakeLDClientFactory

func FakeLDClientFactory(shouldBeInitialized bool) sdks.ClientFactoryFunc

func FakeLDClientFactoryWithChannel

func FakeLDClientFactoryWithChannel(shouldBeInitialized bool, createdCh chan<- *FakeLDClient) 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 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)

Jump to

Keyboard shortcuts

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