launchdarkly-server-sdk-4.4.0: Server-side SDK for integrating with LaunchDarkly
Safe HaskellNone
LanguageHaskell2010

LaunchDarkly.Server.Config

Description

This module is for configuration of the SDK.

Synopsis

Documentation

data Config Source #

Config allows advanced configuration of the LaunchDarkly client.

Instances

Instances details
Generic Config Source # 
Instance details

Defined in LaunchDarkly.Server.Config.Internal

Associated Types

type Rep Config :: Type -> Type #

Methods

from :: Config -> Rep Config x #

to :: Rep Config x -> Config #

type Rep Config Source # 
Instance details

Defined in LaunchDarkly.Server.Config.Internal

type Rep Config

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.

configSetInitialRetryDelay :: Int -> Config -> Config Source #

The initial delay in milliseconds before reconnecting after an error in the SSE client. Defaults to 1 second.

This only applies to the streaming connection. Providing a non-positive integer is a no-op.

configSetAllAttributesPrivate :: Bool -> Config -> Config Source #

Sets whether or not all context attributes (other than the key) should be hidden from LaunchDarkly. If this is true, all context attribute values will be private, not just the attributes specified in PrivateAttributeNames.

configSetPrivateAttributeNames :: Set Reference -> Config -> Config Source #

Marks a set of context attribute names private. Any contexts 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).

configSetContextKeyLRUCapacity :: Natural -> Config -> Config Source #

The number of context keys that the event processor can remember at any one time, so that duplicate context details will not be sent in analytics events.

configSetUserKeyLRUCapacity :: Natural -> Config -> Config Source #

Deprecated: Use configSetContextKeyLRUCapacity instead

Deprecated historically named function which proxies to configSetContextKeyLRUCapacity.

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.

configSetCompressEvents :: Bool -> Config -> Config Source #

Should the event payload sent to LaunchDarkly use gzip compression. By default this is false to prevent backward breaking compatibility issues with older versions of the relay proxy.

Customers not using the relay proxy are strongly encouraged to enable this feature to reduce egress bandwidth cost.

configSetLogger :: (LoggingT IO () -> IO ()) -> Config -> Config Source #

Set the logger to be used by the client.

configSetManager :: Manager -> Config -> Config Source #

Sets the Manager to use with the client. If not set explicitly a new Manager will be created when creating 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 PersistentDataStore -> 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 Proxy 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/home/relay-proxy

configSetDataSourceFactory :: Maybe DataSourceFactory -> Config -> Config Source #

Sets a data source to use instead of the default network based data source see LaunchDarkly.Server.Integrations.FileData

configSetApplicationInfo :: ApplicationInfo -> Config -> Config Source #

An object that allows configuration of application metadata.

Application metadata may be used in LaunchDarkly analytics or other product features, but does not affect feature flag evaluations.

If you want to set non-default values for any of these fields, provide the appropriately configured dict to the Config object.

configSetOmitAnonymousContexts :: Bool -> Config -> Config Source #

Sets whether anonymous contexts should be omitted from index and identify events.

By default, anonymous contexts are included in index and identify events.

data ApplicationInfo Source #

An object that allows configuration of application metadata.

Application metadata may be used in LaunchDarkly analytics or other product features, but does not affect feature flag evaluations.

To use these properties, provide an instance of ApplicationInfo to the Config with configSetApplicationInfo.

makeApplicationInfo :: ApplicationInfo Source #

Create a default instance

withApplicationValue :: Text -> Text -> ApplicationInfo -> ApplicationInfo Source #

Set a new name / value pair into the application info instance.

Values have the following restrictions: - Cannot be empty - Cannot exceed 64 characters in length - Can only contain a-z, A-Z, 0-9, period (.), dash (-), and underscore (_).

Invalid values or unsupported keys will be ignored.