- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 212
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
get config from zookeeper #81
Comments
I didn't know about Zookeeper. OWNER is able to load configuration from standard URLs, which includes "file:", "ftp:", "http[s]:" etc. |
Hi. I just pushed on master some code to get zookeeper configuration. It doesn't support the hot reload mechanism yet, but I hope it will in future (no schedule for this yet). See ZooKeeperLoaderTest.java unit test as example. There are three steps you need to do: // 1st step: define the ZooKeeperConfig class:
@Sources("zookeeper://127.0.0.1:65403/test")
public static interface ZooKeeperConfig extends Config {
String thanks();
List<String> greetings();
String notAvailable();
}
// 2nd step: register a loader to handle the "zookeeper://" URL:
ConfigFactory.registerLoader(new ZooKeeperLoader());
// 3rd step: use things as usual.
ZooKeeperConfig cfg = ConfigFactor.create(ZooKeeperConfig.class); |
Thanks for help, that was my firts pull request :) On Thu, Oct 2, 2014 at 2:12 AM, Luigi R. Viggiano notifications@github.com
|
Cool thanks! |
is there a possibilty to create config from zookeeper instead of file on classpath?
The text was updated successfully, but these errors were encountered: