When accessing strings stored in Consul Key-Value store, the value is always returned in base64 encoding.
KeyValueClient provides the getKVValue() and getKVBinaryValue() family of functions for retrieving values, but in both cases a manual conversion step is needed to reconstruct the original string: base64 decoding is needed after getKVValue(), and byte[] to String conversion is needed after getKVBinaryValue().
It would be nice to introduce a getKVValueString() family of convenience functions that does this manual conversion step automatically.
Decided to introduce a getDecodedValue() function to GetValue. It results in less code duplication than the original proposal above and is just as convenient. @vgv please kindly review #62
When accessing strings stored in Consul Key-Value store, the value is always returned in base64 encoding.
KeyValueClient
provides thegetKVValue()
andgetKVBinaryValue()
family of functions for retrieving values, but in both cases a manual conversion step is needed to reconstruct the original string: base64 decoding is needed aftergetKVValue()
, andbyte[]
toString
conversion is needed aftergetKVBinaryValue()
.It would be nice to introduce a
getKVValueString()
family of convenience functions that does this manual conversion step automatically.