Skip to content

TenitX/Features-Java-SDK-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tenit Feature Flags Java Client

Maven

Add this repository to your maven dependency file:

  <repositories>
    <repository>
      <id>tenit-public-maven-snapshot</id>
      <url>https://storage.googleapis.com/maven.tenitx.com/public/snapshot</url>
    </repository>
  </repositories>

Then add the dependency:

<dependency>
  <groupId>com.tenitx</groupId>
  <artifactId>FeaturesClient</artifactId>
  <version>1.0-SNAPSHOT</version>
</dependency>

Usage

FeaturesClient featuresClient = new FeaturesClient(
  FeaturesClientConfig
    .builder()
    .withApiToken("your-api-token")
    // Default is to cache the response for no time.
    .withCacheTime(Duration.ofMinutes(1))
    .build()
);
boolean isEnabled = featuresClient.isEnabled("my-feature", "abc-123");

FeaturesClientConfig

The input object when creating the client has some fields that allow for customizing the client experience.

Field Description Required
apiToken An api token with permission to read feature flags. Find or create your token here: API Tokens Page Yes
cacheTime A Duration value of how long the client should cache whether a user has a feature enabled for. This is an optimization feature that is not required, and we generally only recommend caching for a few minutes at most. No (Default: 0s)

Tenit Features

Not yet using Tenit Features to manage feature flags in your apps? Learn more about it here.

About

Java client library for interacting with the Tenit Features tool managing feature flags.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages