Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 2.05 KB

File metadata and controls

52 lines (36 loc) · 2.05 KB

Octopus Deploy OpenFeature provider for Java

The OctopusDeploy OpenFeature provider for Java.

This provider works with the OpenFeature Server-Side SDK. It is not intended for use in clients such as browser or desktop applications.

About Octopus Deploy

Octopus Deploy is a sophisticated, best-of-breed continuous delivery (CD) platform for modern software teams. Octopus offers powerful release orchestration, deployment automation, and runbook automation, while handling the scale, complexity and governance expectations of even the largest organizations with the most complex deployment challenges.

Supported Java Versions

This provider will work with Java 11 and above.

Getting Started

Installation

The Octopus OpenFeature provider for Java is available as a Maven package. You can add it to your project using your dependency manager (e.g. Maven or Gradle).

<dependency>
    <groupId>com.octopus.openfeature</groupId>
    <artifactId>octopus-openfeature-provider</artifactId>
    <version>0.2.0</version> <!-- use current version number -->
</dependency>
implementation group: 'com.octopus.openfeature', name: 'octopus-openfeature-provider', version: '0.2.0'
// Use current version number

Usage

import dev.openfeature.sdk.*;
import com.octopus.openfeature.provider.*;

public class Main {
    
    public static void main(String[] args) {
        var openFeature = OpenFeatureAPI.getInstance();
        openFeature.setProviderAndWait(new OctopusProvider(new OctopusConfiguration("Your Octopus client identifier")));
        var openFeatureClient = openFeature.getClient(); 
        
        var darkModeIsEnabled = openFeatureClient.getBooleanValue("dark-mode", false);
    }
}

For information on using the OpenFeature client please refer to the OpenFeature Documentation.