magnetme / consultant Goto Github PK
View Code? Open in Web Editor NEWA library to retrieve your service's configuration from Consul, and subscribe to changes.
License: Apache License 2.0
A library to retrieve your service's configuration from Consul, and subscribe to changes.
License: Apache License 2.0
...results in a NPE
How to reproduce:
The README implies that using withConsulHost
without a port, will default to 8500, which is not the case.
Would allow to authenticate via custom header to locked down Consul environments.
Allow to update a specific key with a value.
A method on the consultant client like
consultant.setConfig(String fullKeyPath, String keyValue)
Would require a check, that only keys and not folders are allowed to write. (no slash at the end of the fullKeyPath)
Hi,
Have you ever thought to put in Consultant builder a way to define port different than 8500 ? Thanks in advance!
as soon as a key has been created in the KV store for the registered service without a value, consultant starts throwing NullPointerExceptions repeatedly:
consultant version: 1.7.4
consul version: 1.0.2
2018-01-05T14:27:37,426Z ERROR [pool-1-thread-1] me.magnet.consultant.ConfigUpdater - Error occurred while retrieving/publishing new config from Consul: null
java.lang.NullPointerException: null
at java.util.Base64$Decoder.decode(Base64.java:549) ~[na:1.8.0_121]
at me.magnet.consultant.ConfigUpdater.updateConfig(ConfigUpdater.java:172) ~[consultant-1.7.4.jar:na]
at me.magnet.consultant.ConfigUpdater.run(ConfigUpdater.java:105) ~[consultant-1.7.4.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
The config response for my KV is:
[
{
"LockIndex": 0,
"Key": "config/phoenix-app-local/networks/network01",
"Flags": 0,
"Value": "MTIz",
"CreateIndex": 19,
"ModifyIndex": 24
},
{
"LockIndex": 0,
"Key": "config/phoenix-app-local/networks/network02",
"Flags": 0,
"Value": "YWJjCmNkZQ==",
"CreateIndex": 21,
"ModifyIndex": 21
},
{
"LockIndex": 0,
"Key": "config/phoenix-app-local/failing-key",
"Flags": 0,
"Value": null,
"CreateIndex": 26,
"ModifyIndex": 26
}
]
Means the issue occurs for keys which don't have a value set "config/phoenix-app-local/failing-key"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.