etcdv3 / etcd-client

An etcd v3 API client
Apache License 2.0
210 stars 51 forks source link

tonic options max_decoding_message_size/max_encoding_message_size #69

Closed harscoet closed 11 months ago

harscoet commented 11 months ago

Currently its not possible to define tonic options to change max_encoding_message_size and max_decoding_message_size I redefined them in KvClient and WatchClient (I didn't add max_encoding_message_size for watch client as I don't see any use case for it)

let etcd_client = etcd_client::Client::connect(["localhost:2379"], None).await.unwrap();

let etcd_kv_client = etcd_client
  .kv_client()
  .max_encoding_message_size(10* 1024 * 1024);
  .max_decoding_message_size(10* 1024 * 1024);

let etcd_watch_client = etcd_client
  .watch_client()
  .max_decoding_message_size(10* 1024 * 1024);
davidli2010 commented 11 months ago

LGTM, thanks!