SDK quick linksLaunchDarkly’s SDKs are open source. In addition to this reference guide, we provide source, API reference documentation, and a sample application:
| Resource | Location |
|---|---|
| SDK API documentation | SDK API docs |
| Supported SDK Versions | Haskell server SDK |
| GitHub repository | haskell-server-sdk |
| Sample application | Haskell |
| Published module | Hackage |
Get started
Follow the steps below to get started using the LaunchDarkly SDK in your Haskell application.Install the SDK
The root module of the SDKLaunchDarkly.Server re-exports the entire project.
Here is an example:
The Haskell SDK uses an SDK keyThe Haskell SDK uses an SDK key. Keys are specific to each project and environment. They are available on the SDK keys page under Settings. To learn more about key types, read Keys.
Initialize the client
After you import and install the SDK, create a single shared instance ofClient. Specify your SDK key to authorize your application to connect to a particular environment within LaunchDarkly.
Here’s how:
Config.
Evaluate a context
You can useclient to check which variation a particular context will receive for a given feature flag. To learn more, read Flag variation evaluation and Flag variation evaluation details. For more information about how contexts are specified, read Context configuration.
Here’s how:
Shut down the client
Shut down the client when your application terminates. To learn more, read Shutting down.Supported features
This SDK supports the following features:- SDK configuration, including
- Anonymous contexts and users
- Context configuration
- Flag variation evaluation
- Flag variation evaluation details
- Flushing events
- Getting all flags
- Identifying and changing contexts
- Offline mode
- Private attributes
- Reading flags from a file
- Relay Proxy configuration
- Secure mode
- Tracking custom events
- Shutting down
- Storing data
- Test data sources