Skip to content

figchain/java-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FigChain Java Client

Official Java client library for FigChain configuration management.

GitHub Release

Features

  • Real-time configuration updates - Subscribe to configuration changes with long polling or fixed-rate strategies
  • Rule-based rollouts - Evaluate feature flags and configurations based on user context
  • Type-safe models - Avro-based serialization for efficient data transfer
  • Flexible storage - In-memory or custom storage backends
  • Java 21+ - Targets modern Java features

Installation

Maven

Add the FigChain repository to your pom.xml:

<repositories>
    <repository>
        <id>figchain-public</id>
        <url>https://maven.repo.figchain.io/releases</url>
    </repository>
</repositories>

Add the dependency:

<dependency>
    <groupId>io.figchain</groupId>
    <artifactId>figchain-client</artifactId>
    <version>1.0.6</version>
</dependency>

Gradle

Add the FigChain repository to your build.gradle:

repositories {
    maven {
        url = uri("https://maven.repo.figchain.io/releases")
    }
}

Add the dependency:

implementation 'io.figchain:figchain-client:1.0.6'

Quick Start

import io.figchain.client.FcClient;
import io.figchain.client.FcClientBuilder;
import io.figchain.client.EvaluationContext;

// Build the client
FcClient client = new FcClientBuilder()
    .apiKey("your-api-key")
    .environmentId("your-environment-id")
    .namespace("default")
    .build();

// Start the client
client.start();

// Evaluate a configuration (for traffic split support)
EvaluationContext context = EvaluationContext.builder()
    .addAttribute("userId", "user123")
    .addAttribute("plan", "premium")
    .build();

GeneratedConfigModel configValue = client.getEvaluatedFig("your-fig-key", context, GeneratedConfigModel.class);

// Shutdown when done
client.shutdown();

Documentation

For detailed usage instructions, see the Client Documentation.

Requirements

  • Java 21 or later
  • Maven 3.8+ or Gradle 7+

Building from Source

mvn clean install

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Support

About

Official Java client library for FigChain configuration management

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •  

Languages