Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add some sort of reload helper #21

Open
auriium opened this issue May 24, 2021 · 2 comments
Open

Feature: Add some sort of reload helper #21

auriium opened this issue May 24, 2021 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@auriium
Copy link

auriium commented May 24, 2021

Simple - add a "reload helper" object that allows you to return a config value, and also be reloaded. When reloaded the config value returned will change. I may propose an object in a future PR.

@A248
Copy link
Owner

A248 commented May 24, 2021

I think what you are suggesting is a configuration instance whose data can be reloaded. I've considered this before, but never got around to implementing it.

Example sketch:

interface MyConfig {
  String someOption();
}

MyConfig config = readConfig();
assert config.someOption().equals("valueOne");
reloadConfig();
assert config.someOption().equals("valueTwo");

@A248 A248 added the enhancement New feature or request label May 24, 2021
@A248 A248 added this to the 1.3.0 milestone May 24, 2021
@A248 A248 modified the milestones: 1.3.0, 2.0.0 Aug 29, 2023
@A248
Copy link
Owner

A248 commented Aug 29, 2023

This will be easier to add in 2.0.0 since we will have a more standardized means of creating configuration instances with arbitrary behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants