Skip to content
Golang SDK for LaunchDarkly
Branch: v4
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github/ISSUE_TEMPLATE Update issue templates Mar 13, 2019
ldconsul 4.7.3 release (#1) Apr 29, 2019
lddynamodb 4.7.3 release (#1) Apr 29, 2019
ldfiledata 4.7.3 release (#1) Apr 29, 2019
ldfilewatch 4.7.3 release (#1) Apr 29, 2019
redis
scripts
shared_test 4.7.3 release (#1) Apr 29, 2019
utils
vendor prepare 4.7.2 release (#139) Apr 26, 2019
.golangci.yml
CHANGELOG.md
CODEOWNERS
CONTRIBUTING.md
Gopkg.lock prepare 4.7.2 release (#139) Apr 26, 2019
Gopkg.toml
LICENSE.txt Add CONTRIBUTING.md, update copyright Aug 9, 2016
Makefile DRY up and simplify code (#85) Jun 13, 2018
README.md 4.7.3 release (#1) Apr 29, 2019
azure-pipelines.yml prepare 4.7.2 release (#139) Apr 26, 2019
evaluation_detail.go prepare 4.3.0 release (#129) Aug 27, 2018
evaluation_detail_test.go
event_processor.go prepare 4.7.0 release (#135) Dec 18, 2018
event_processor_test.go
event_summarizer.go
event_summarizer_test.go prepare v4 release (#119) May 10, 2018
events.go
events_output.go
feature_store.go
feature_store_test.go 4.7.3 release (#1) Apr 29, 2019
flag.go
flag_test.go prepare 4.4.0 release (#130) Oct 30, 2018
flags_state.go
flags_state_test.go prepare 4.4.0 release (#130) Oct 30, 2018
ldclient.go
ldclient_evaluation_test.go prepare 4.4.0 release (#130) Oct 30, 2018
ldclient_offline_test.go prepare 4.3.0 release (#129) Aug 27, 2018
ldclient_test.go
legacy_feature.go
lru_cache.go
lru_cache_test.go
operators.go Fix lint issues and enable more linters and go versions (#83) Jun 11, 2018
operators_test.go
polling.go prepare 4.2.2 release (#128) Aug 3, 2018
polling_test.go
requestor.go prepare 4.2.2 release (#128) Aug 3, 2018
segment.go
segment_test.go
streaming.go
streaming_test.go
user.go Fix lint issues and enable more linters and go versions (#83) Jun 11, 2018
user_filter.go
user_filter_test.go prepare v4 release (#119) May 10, 2018
user_test.go Add test for NewUser Mar 5, 2018
util.go prepare 4.2.2 release (#128) Aug 3, 2018
util_test.go
versioned_data.go

README.md

LaunchDarkly Server-side SDK for Go

Circle CI

LaunchDarkly overview

LaunchDarkly is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. Get started using LaunchDarkly today!

Supported Go versions

This version of the LaunchDarkly SDK has been tested with Go 1.8 through 1.10.

Getting started

Refer to the SDK documentation for instructions on getting started with using the SDK.

HTTPS proxy

Go's standard HTTP library provides built-in support for the use of an HTTPS proxy. If the HTTPS_PROXY environment variable is present then the SDK will proxy all network requests through the URL provided.

How to set the HTTPS_PROXY environment variable on Mac/Linux systems:

export HTTPS_PROXY=https://web-proxy.domain.com:8080

How to set the HTTPS_PROXY environment variable on Windows systems:

set HTTPS_PROXY=https://web-proxy.domain.com:8080

If your proxy requires authentication then you can prefix the URN with your login information:

export HTTPS_PROXY=http://user:pass@web-proxy.domain.com:8080

or

set HTTPS_PROXY=http://user:pass@web-proxy.domain.com:8080

Database integrations

Feature flag data can be kept in a persistent store using Redis, Consul, or DynamoDB. These adapters are implemented in the subpackages redis, ldconsul, and lddynamodb; to use them, call the New...FeatureStore function provided by the subpackage, and put the returned object in the FeatureStore field of your client configuration. See the subpackages and the SDK reference guide for more information.

Learn more

Check out our documentation for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the complete reference guide for this SDK.

Testing

We run integration tests for all our SDKs using a centralized test harness. This approach gives us the ability to test for consistency across SDKs, as well as test networking behavior in a long-running application. These tests cover each method in the SDK, and verify that event sending, flag evaluation, stream reconnection, and other aspects of the SDK all behave correctly.

Contributing

We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to this SDK.

About LaunchDarkly

  • LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
    • Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
    • Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
    • Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
    • Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
  • LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out our documentation for a complete list.
  • Explore LaunchDarkly
You can’t perform that action at this time.