Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module is for configuration of the SDK.
Synopsis
- data Config
- makeConfig :: Text -> Config
- configSetKey :: Text -> Config -> Config
- configSetBaseURI :: Text -> Config -> Config
- configSetStreamURI :: Text -> Config -> Config
- configSetEventsURI :: Text -> Config -> Config
- configSetStreaming :: Bool -> Config -> Config
- configSetAllAttributesPrivate :: Bool -> Config -> Config
- configSetPrivateAttributeNames :: Set Text -> Config -> Config
- configSetFlushIntervalSeconds :: Natural -> Config -> Config
- configSetPollIntervalSeconds :: Natural -> Config -> Config
- configSetUserKeyLRUCapacity :: Natural -> Config -> Config
- configSetInlineUsersInEvents :: Bool -> Config -> Config
- configSetEventsCapacity :: Natural -> Config -> Config
- configSetLogger :: (LoggingT IO () -> IO ()) -> Config -> Config
- configSetSendEvents :: Bool -> Config -> Config
- configSetOffline :: Bool -> Config -> Config
- configSetRequestTimeoutSeconds :: Natural -> Config -> Config
- configSetStoreBackend :: Maybe StoreInterface -> Config -> Config
- configSetStoreTTL :: Natural -> Config -> Config
- configSetUseLdd :: Bool -> Config -> Config
Documentation
makeConfig :: Text -> Config Source #
Create a default configuration from a given SDK key.
configSetKey :: Text -> Config -> Config Source #
Set the SDK key used to authenticate with LaunchDarkly.
configSetBaseURI :: Text -> Config -> Config Source #
The base URI of the main LaunchDarkly service. This should not normally be changed except for testing.
configSetStreamURI :: Text -> Config -> Config Source #
The base URI of the LaunchDarkly streaming service. This should not normally be changed except for testing.
configSetEventsURI :: Text -> Config -> Config Source #
The base URI of the LaunchDarkly service that accepts analytics events. This should not normally be changed except for testing.
configSetStreaming :: Bool -> Config -> Config Source #
Sets whether streaming mode should be enabled. By default, streaming is enabled. It should only be disabled on the advice of LaunchDarkly support.
configSetAllAttributesPrivate :: Bool -> Config -> Config Source #
Sets whether or not all user attributes (other than the key) should be hidden from LaunchDarkly. If this is true, all user attribute values will be private, not just the attributes specified in PrivateAttributeNames.
configSetPrivateAttributeNames :: Set Text -> Config -> Config Source #
Marks a set of user attribute names private. Any users sent to LaunchDarkly with this configuration active will have attributes with these names removed.
configSetFlushIntervalSeconds :: Natural -> Config -> Config Source #
The time between flushes of the event buffer. Decreasing the flush interval means that the event buffer is less likely to reach capacity.
configSetPollIntervalSeconds :: Natural -> Config -> Config Source #
The polling interval (when streaming is disabled).
configSetUserKeyLRUCapacity :: Natural -> Config -> Config Source #
The number of user keys that the event processor can remember at any one time, so that duplicate user details will not be sent in analytics events.
configSetInlineUsersInEvents :: Bool -> Config -> Config Source #
Set to true if you need to see the full user details in every analytics event.
configSetEventsCapacity :: Natural -> Config -> Config Source #
The capacity of the events buffer. The client buffers up to this many events in memory before flushing. If the capacity is exceeded before the buffer is flushed, events will be discarded.
configSetLogger :: (LoggingT IO () -> IO ()) -> Config -> Config Source #
Set the logger to be used by the client.
configSetSendEvents :: Bool -> Config -> Config Source #
Sets whether to send analytics events back to LaunchDarkly. By default, the client will send events. This differs from Offline in that it only affects sending events, not streaming or polling for events from the server.
configSetOffline :: Bool -> Config -> Config Source #
Sets whether this client is offline. An offline client will not make any network connections to LaunchDarkly, and will return default values for all feature flags.
configSetRequestTimeoutSeconds :: Natural -> Config -> Config Source #
Sets how long an the HTTP client should wait before a response is returned.
configSetStoreBackend :: Maybe StoreInterface -> Config -> Config Source #
Configures a handle to an external store such as Redis.
configSetStoreTTL :: Natural -> Config -> Config Source #
When a store backend is configured, control how long values should be cached in memory before going back to the backend.
configSetUseLdd :: Bool -> Config -> Config Source #
Sets whether this client should use the LaunchDarkly relay in daemon mode. In this mode, the client does not subscribe to the streaming or polling API, but reads data only from the feature store. See: https://docs.launchdarkly.com/docs/the-relay-proxy