use of io.etcd.jetcd.election.ResignResponse in project jetcd by coreos.
the class ElectionImpl method resign.
@Override
public CompletableFuture<ResignResponse> resign(LeaderKey leaderKey) {
checkNotNull(leaderKey, "leader key should not be null");
ResignRequest request = ResignRequest.newBuilder().setLeader(io.etcd.jetcd.api.LeaderKey.newBuilder().setKey(ByteString.copyFrom(leaderKey.getKey().getBytes())).setName(ByteString.copyFrom(leaderKey.getName().getBytes())).setLease(leaderKey.getLease()).setRev(leaderKey.getRevision()).build()).build();
return completable(stub.resign(request), ResignResponse::new, this::convertException);
}
Aggregations