use of com.ibm.etcd.api.AuthenticateRequest in project etcd-java by IBM.
the class EtcdClient method authenticate.
private ListenableFuture<AuthenticateResponse> authenticate() {
AuthenticateRequest request = AuthenticateRequest.newBuilder().setNameBytes(name).setPasswordBytes(password).build();
// no call creds for auth call
CallOptions callOpts = CallOptions.DEFAULT;
return Futures.catchingAsync(grpc.fuCall(METHOD_AUTHENTICATE, request, callOpts, 0L), Exception.class, ex -> !retryAuthRequest(ex) ? Futures.immediateFailedFuture(ex) : grpc.fuCall(METHOD_AUTHENTICATE, request, callOpts, 0L));
}
Aggregations