Giter Site home page Giter Site logo

toggle-first's Introduction

Using With Spring

Register feature manager for database persistence

@Bean
public FeatureManager featureManager(DataSource dataSource){
	return new DefaultFeatureManager()
		.featureMetadataProvider(new EnumFeatureMetadataProvider())
		.featureRepository(new JDBCFeatureRepository(dataSource))
	;
}

Create your Feature enum

public enum Parameter implements InteractiveFeature {

	@FeatureDefaults(status = Status.ACTIVE, value = "Congrats!")
	FREE_COINS

	;

	@Override
	public FeatureManager manager() {
		return FeatureContext.getFeatureManager();
	}
}

Using

Parameter.FREE_COINS.isActive();

Registering JMX

FeatureSwitchJMX.register();

Examples

toggle-first's People

Contributors

mageddo avatar

Watchers

 avatar

Forkers

amanurat

toggle-first's Issues

JDBC Repository auto migration

What is expected

Toggle First automatically create necessary tables to store data on the database when using jdbc repository

Strategies Support (Gradual Activation)

Current Behavior

Actually toggle-first have not support for activation strategies the flow works as bellow

image

What is expected

After retrieve metadata from the repository the Feature Manager check available Activation Strategies to determine if feature is active or not

image

Setup automated build release

Current Behavior

I have to manually build the app to check if it's building and manually upload the archives to nexus repository

Expected Behavior

Build the project when it is merged and upload the archives to nexus repository

Tasks

  • Setup travis master branch build
  • Setup travis pull request branch build
  • Setup gradle release plugin
  • Setup nexus release

WEB manage panel

What is expected

A web panel where you can

  • Create / Update / Delete features
  • Activate/Disable strategies for a specified feature
  • Activate/Disable a feature for a user

Setup spring auto configuration

What is expected

Spring configuration be made by using

@EnableToggleFirst

What is happening

I have to scan toggle first package

@ComponentScan("com.mageddo.togglefirst")

Affected version

1.4.3

FeatureContext#getFeatureManager Should return singletion Object

Describe the bug
FeatureContext#getFeatureManager Should return singletion Object

To Reproduce
Steps to reproduce the behavior:

  1. Call FeatureContext#getFeatureManager multiple times
  2. Method is returning different instances for every call

Expected behavior
Method returns the same instance for all the calls

Additional context

  • Version: 1.4.3

Add any other context about the problem here.

Rest API to check and manage features

What is expected

A deployable app where you can call REST apis to manage and check your features instead of setup toggle-first-core as project dependency

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.