Documentation
¶
Overview ¶
Package testhelpers contains types and functions that may be useful in testing SDK functionality or custom integrations.
It contains two subpackages: ldtestdata, which provides a test fixture for setting flag values programmatically, and storetest, which provides a standard test suite for custom persistent data store implementations.
The APIs in this package and its subpackages are supported as part of the SDK.
Index ¶
- type SimpleClientContext
- func (s SimpleClientContext) GetBasic() interfaces.BasicConfiguration
- func (s SimpleClientContext) GetHTTP() interfaces.HTTPConfiguration
- func (s SimpleClientContext) GetLogging() interfaces.LoggingConfiguration
- func (s SimpleClientContext) WithHTTP(httpConfig interfaces.HTTPConfigurationFactory) SimpleClientContext
- func (s SimpleClientContext) WithLogging(loggingConfig interfaces.LoggingConfigurationFactory) SimpleClientContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleClientContext ¶
type SimpleClientContext struct {
// contains filtered or unexported fields
}
SimpleClientContext is a reference implementation of interfaces.ClientContext for test code.
The SDK uses the ClientContext interface to pass its configuration to subcomponents. Its standard implementation also contains other environment information that is only relevant to built-in SDK code. SimpleClientContext may be useful for external code to test a custom component.
func NewSimpleClientContext ¶
func NewSimpleClientContext(sdkKey string) SimpleClientContext
NewSimpleClientContext creates a SimpleClientContext instance, with a standard HTTP configuration and a disabled logging configuration.
func (SimpleClientContext) GetBasic ¶
func (s SimpleClientContext) GetBasic() interfaces.BasicConfiguration
func (SimpleClientContext) GetHTTP ¶
func (s SimpleClientContext) GetHTTP() interfaces.HTTPConfiguration
func (SimpleClientContext) GetLogging ¶
func (s SimpleClientContext) GetLogging() interfaces.LoggingConfiguration
func (SimpleClientContext) WithHTTP ¶
func (s SimpleClientContext) WithHTTP(httpConfig interfaces.HTTPConfigurationFactory) SimpleClientContext
WithHTTP returns a new SimpleClientContext based on the original one, but adding the specified HTTP configuration.
func (SimpleClientContext) WithLogging ¶
func (s SimpleClientContext) WithLogging(loggingConfig interfaces.LoggingConfigurationFactory) SimpleClientContext
WithLogging returns a new SimpleClientContext based on the original one, but adding the specified logging configuration.
Directories
¶
Path | Synopsis |
---|---|
Package ldtestdata provides a mechanism for providing dynamically updatable feature flag state in a simplified form to an SDK client in test scenarios.
|
Package ldtestdata provides a mechanism for providing dynamically updatable feature flag state in a simplified form to an SDK client in test scenarios. |
Package storetest contains the standard test suite for persistent data store implementations.
|
Package storetest contains the standard test suite for persistent data store implementations. |