consul-rust
consul-rust copied to clipboard
Rust client libray for Consul HTTP API
Consul actually supports binary data, as per the documentation https://www.consul.io/api/kv.html#create-update-key The library should ideally support a `Vec` as payload. Unfortunately, with the current API this requires owning a `KVPair`, which...
When Session::renew yields a 404 response `Response: '404 Not Found' for http://localhost:8500/v1/session/renew/f933ddd8-c5a6-5d7e-898e-95fc8aebaadb?` to a PUT request, the client will return the following JSON parse error `Error(Msg("Failed to parse JSON"), State...
See https://github.com/pierresouchay/consul-rust/pull/48. Test code: ``` let pair = KVPair { Key: String::from("testkey"), Value: String::from("testvalue"), ..Default::default() }; assert!(client.put(&pair, None).unwrap().0); let b64val = client.get("testkey", None).unwrap().0.unwrap().Value; let bytes = base64::decode(b64val).unwrap(); assert_eq!(std::str::from_utf8(&bytes).unwrap().to_string(), "testvalue"); ```...
It would be awesome if we could get support for the TXN endpoint of the consul api: https://www.consul.io/api/txn.html Willing to help out with that if need be.
Hello. I've noticed is something bad is happend with consul response (e.g. some error code, malformed JSON, etc.) It returns something like "JSON error", without any additional info that could...
Without ServiceRegistration, this lib cannot be used to register a service on consul.
Currently, KV Values are returned as base64 encoded Strings containing arbitrary data. These could be decoded transparently by the library.
Will allow validating various datastructures (ex: serviceName with '/', Metadata limite keys/size...)
I saw that there was a refactor (0.3.0) going on for this project and understood the benefits of that over 0.2.0, mostly the move to reqwest, etc. That being said...