Quarkus - Unleash
Unleash is a feature toggle system, that gives you a great overview of all feature toggles across all your applications and services. Quarkus Unleash extension is client for Unleash.
Installation
If you want to use this extension, you need to add the quarkiverse-unleash
extension first.
In your pom.xml
file, add:
<dependency>
<groupId>io.quarkiverse.unleash</groupId>
<artifactId>quarkus-unleash</artifactId>
</dependency>
Usage
Assuming you have Unleash running on localhost:4242 you should add the following properties to your application.properties and fill in the values for url.
quarkus.unleash.url=http://localhost:4242/api
Once you have configured the properties, you can start using an Unleash-client.
@ApplicationScoped
public class TestService {
@Inject
Unleash unleash;
public boolean isTest() {
return unleash.isEnabled("quarkus.unleash.test");
}
}
Extension Configuration Reference
Configuration property fixed at build time - All other configuration properties are overridable at runtime
Type |
Default |
|
---|---|---|
Unleash URL service endpoint |
string |
required |
Application name |
string |
|
Project name |
string |
|
Instance ID. |
string |
|
Disable Unleash metrics |
boolean |
|
Application Unleash token |
string |
|
Application environment |
string |
|
Fetch toggles interval |
long |
|
Send metrics interval |
long |
|
Backup file |
string |
|
A synchronous fetch on initialisation |
boolean |
|
Enable proxy authentication by JVM properties |
boolean |
|