gRPC naming and discovery

    The etcd client provides a gRPC resolver for resolving gRPC endpoints with an etcd backend. The resolver is initialized with an etcd client and given a target for resolution:

    Managing service endpoints

    New endpoints can be added to the service through etcdctl:

      Hosts can be deleted from the service through etcdctl:

      Registering an endpoint with a lease ensures that if the host can’t maintain a keepalive heartbeat (e.g., its machine fails), it will be removed from the service:

      1. lease=`ETCDCTL_API=3 etcdctl lease grant 5 | cut -f2 -d' '`
      2. ETCDCTL_API=3 etcdctl lease keep-alive $lease