3 ms·
Look at the code for the watcher client[1] and lease management[2]. [1]: https://github.com/etcd-io/etcd/blob/main/client/v3/watch.go https://github.com/etcd-i
by jhgg 2y ago
Look at the code for the watcher client[1] and lease management[2].
[1]: https://github.com/etcd-io/etcd/blob/main/client/v3/watch.go https://github.com/etcd-io/etcd/blob/main/client/v3/watch.go
[2]: https://github.com/etcd-io/etcd/blob/main/client/v3/lease.go https://github.com/etcd-io/etcd/blob/main/client/v3/lease.go
- tjungblut 2y agoThe watch is a simple processing loop that receives and sends on a bi-directional GRPC channel. Leases have a similar loop for keep-alive messages, everything else is quite literally delegated. I get that it's difficult to translate this 1:1 into Rust without channels and select primitives, but saying it's complex is wild. Try the server-side code for leases ;)