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 ¶
- func ClientFactoryThatFails(err error) sdks.ClientFactoryFunc
- func CreateDummyClient(sdkKey config.SDKKey, sdkConfig ld.Config, timeout time.Duration) (sdks.LDClientContext, error)
- func FakeHashForContext(context ldcontext.Context) string
- func FakeLDClientFactory(shouldBeInitialized bool) sdks.ClientFactoryFunc
- func FakeLDClientFactoryWithChannel(shouldBeInitialized bool, createdCh chan<- *FakeLDClient) sdks.ClientFactoryFunc
- func RealLDClientFactoryWithChannel(shouldBeInitialized bool, createdCh chan<- CapturedLDClient) sdks.ClientFactoryFunc
- type CapturedLDClient
- type FakeLDClient
- func (c *FakeLDClient) AwaitClose(t *testing.T, timeout time.Duration)
- func (c *FakeLDClient) Close() error
- func (c *FakeLDClient) GetDataSourceStatus() interfaces.DataSourceStatus
- func (c *FakeLDClient) GetDataStoreStatus() sdks.DataStoreStatusInfo
- func (c *FakeLDClient) Initialized() bool
- func (c *FakeLDClient) SecureModeHash(context ldcontext.Context) string
- func (c *FakeLDClient) SetDataSourceStatus(newStatus interfaces.DataSourceStatus)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientFactoryThatFails ¶
func ClientFactoryThatFails(err error) sdks.ClientFactoryFunc
func CreateDummyClient ¶
func FakeHashForContext ¶
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)
Click to show internal directories.
Click to hide internal directories.