GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - configcat/cpp-sdk: ConfigCat SDK for C++. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.

BranchesTags
Open more actions menu

Latest commit

 

History

194 Commits
194 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
cmake
cmake
 
 
docker
docker
 
 
include/configcat
include/configcat
 
 
media
media
 
 
samples
samples
 
 
src
src
 
 
test
test
 
 
.clang-format
.clang-format
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
DEPLOY.md
DEPLOY.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
vcpkg.json
vcpkg.json
 
 

Repository files navigation

Build codecov

ConfigCat SDK for C++

https://configcat.com

ConfigCat SDK for C++ provides easy integration for your application to ConfigCat.

C++ Standard Minimum Level: C++17.

ConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using ConfigCat Dashboard even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.

ConfigCat is a hosted feature flag service. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.

Getting started

1. Install the ConfigCat SDK

With Vcpkg

  • On Windows:

    git clone https://github.com/microsoft/vcpkg
    .\vcpkg\bootstrap-vcpkg.bat
    .\vcpkg\vcpkg install configcat

    In order to use vcpkg with Visual Studio, run the following command (may require administrator elevation):

    .\vcpkg\vcpkg integrate install

    After this, you can create a New non-CMake Project (or open an existing one). All installed libraries are immediately ready to be #include'd and used in your project without additional configuration.

  • On Linux/Mac:

    git clone https://github.com/microsoft/vcpkg
    ./vcpkg/bootstrap-vcpkg.sh
    ./vcpkg/vcpkg install configcat

In order to use vcpkg with CMake, you can use the toolchain file:

cmake -B [build directory] -S . "-DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake"
cmake --build [build directory]

We recommend that you use the vcpkg.json manifest file to add the dependencies to your project. You can find an example manifest file here.

2. Go to the ConfigCat Dashboard to get your SDK Key

SDK-KEY

3. Include configcat.h header in your application code

#include <configcat/configcat.h>

using namespace configcat;

4. Create a ConfigCat client instance

auto client = ConfigCatClient::get("#YOUR-SDK-KEY#");

5. Get your setting value

bool isMyAwesomeFeatureEnabled = client->getValue("isMyAwesomeFeatureEnabled", false);
if (isMyAwesomeFeatureEnabled) {
    doTheNewThing();
} else {
    doTheOldThing();
}

6. Close the client on application exit

ConfigCatClient::closeAll();

Getting user-specific setting values with Targeting

Using this feature, you will be able to get different setting values for different users in your application by passing a User Object to the getValue() function.

Read more about Targeting here.

User Object

Percentage and targeted rollouts are calculated by the user object passed to the configuration requests. The user object must be created with a mandatory identifier parameter which uniquely identifies each user:

auto user = ConfigCatUser::create("#USER-IDENTIFIER#");

bool isMyAwesomeFeatureEnabled = client->getValue("isMyAwesomeFeatureEnabled", false, user);
if (isMyAwesomeFeatureEnabled) {
    doTheNewThing();
} else {
    doTheOldThing();
}

Sample/Demo apps

  • Sample Console app

Polling Modes

The ConfigCat SDK supports three different polling mechanisms to acquire the setting values from ConfigCat. After the latest setting values are downloaded, they are stored in an internal cache . After that, all requests are served from the cache. Read more about Polling Modes and how to use them at ConfigCat C++ Docs.

Support

If you need help using this SDK, feel free to contact the ConfigCat Staff at https://configcat.com. We're happy to help.

Contributing

Contributions are welcome. For more info please read the Contribution Guideline.

About ConfigCat

  • Official ConfigCat SDKs for other platforms
  • Documentation
  • Blog

External Libraries

ConfigCat C++ SDK uses these wonderful libraries: hash-library, libcurl, nlohmann-json, z4kn4fein-semver.

About

ConfigCat SDK for C++. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.

configcat.com/docs/sdk-reference/cpp

Topics

configcatcppcpp-sdkfeature-flagsfeature-managementfeature-togglesfeatureflagsremote-configsdk

Resources

Readme
MIT license

Contributing

Contributing
Activity
Custom properties

Stars

22 stars

Watchers

5 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.