/// <summary> /// Sets the key value in etcd /// </summary> /// <param name="key">Key for which value need to be set</param> /// <param name="val">Value corresponding the key</param> /// <returns></returns> public void Put(string key, string val) { var putResponse = _kvClient.Put(new PutRequest { Key = ByteString.CopyFromUtf8(key), Value = ByteString.CopyFromUtf8(val) }, _headers); }
/// <summary> /// Sets the key value in etcd /// </summary> /// <param name="key">Key for which value need to be set</param> /// <param name="val">Value corresponding the key</param> /// <returns></returns> public PutResponse Put(string key, string val) { try { return(_kvClient.Put(new PutRequest { Key = ByteString.CopyFromUtf8(key), Value = ByteString.CopyFromUtf8(val) }, _headers)); } catch (Grpc.Core.RpcException) { ResetConnection(); throw; } catch { throw; } }