I am writing a golang consul client use the consul golang api.
I need to retrieve multiple key/values and filter them by their value content.
I’m using the KV.List() api and trying to use the filter string in the
QueryOptions parameter. It does not seem to be working. I get everything unfiltered. Is filtering supported on this endpoint?
The fields in the json that is stored for the values has all lower case names.
Is that a problem (unexported)?
Thanks for any guidance you can provide.
Hi @jofowler,
Consul does not support filtering on the KV endpoints. The values are not parsed by Consul before it sends a reply. They are simply returned as base64 blobs of data.
You would need to decode and filter the values on the client side.
@blake Thanks for the verification that filtering is not supported on this endpoint.