/// <summary> /// UserGetAsync gets detailed user information in async /// </summary> /// <param name="request"></param> /// <returns></returns> public async Task <AuthUserGetResponse> UserGetAsync(AuthUserGetRequest request, Metadata headers = null) { AuthUserGetResponse response = new AuthUserGetResponse(); bool success = false; int retryCount = 0; while (!success) { try { response = await _balancer.GetConnection().authClient.UserGetAsync(request, headers); success = true; } catch (RpcException ex) when(ex.StatusCode == StatusCode.Unavailable) { retryCount++; if (retryCount >= _balancer._numNodes) { throw ex; } } } return(response); }
/// <summary> /// UserGetAsync gets detailed user information in async /// </summary> /// <param name="request"></param> /// <returns></returns> public async Task <AuthUserGetResponse> UserGetAsync(AuthUserGetRequest request, Metadata headers = null) { AuthUserGetResponse response = new AuthUserGetResponse(); response = await _balancer.GetConnection().authClient.UserGetAsync(request, headers); return(response); }
/// <summary> /// UserGet gets detailed user information /// </summary> /// <param name="request"></param> /// <returns></returns> public AuthUserGetResponse UserGet(AuthUserGetRequest request, Metadata headers = null) { AuthUserGetResponse response = new AuthUserGetResponse(); response = _balancer.GetConnection().authClient.UserGet(request, headers); return(response); }
public AuthUserGetResponse UserGet(ByteSequence user) { Etcdserverpb.AuthUserGetRequest userGetRequest = new Etcdserverpb.AuthUserGetRequest(); userGetRequest.Name = user.ToString(); var rsp = authClient.UserGet(userGetRequest); AuthUserGetResponse response = new AuthUserGetResponse(rsp); return(response); //return Util.ToCompletableFuture( // this.stub.userGet(userGetRequest), // new FunctionResponse<Etcdserverpb.AuthUserGetRequest, AuthUserGetResponse>()); }
/// <summary> /// UserGetAsync gets detailed user information in async /// </summary> /// <param name="request"></param> /// <returns></returns> public async Task <AuthUserGetResponse> UserGetAsync(AuthUserGetRequest request) { AuthUserGetResponse response = new AuthUserGetResponse(); try { response = await _authClient.UserGetAsync(request, _headers); } catch (RpcException ex) { ResetConnection(ex); throw; } catch { throw; } return(response); }
/// <summary> /// UserGet gets detailed user information /// </summary> /// <param name="request"></param> /// <returns></returns> public AuthUserGetResponse UserGet(AuthUserGetRequest request) { AuthUserGetResponse response = new AuthUserGetResponse(); try { response = _authClient.UserGet(request, _headers); } catch (RpcException ex) { ResetConnection(ex); throw; } catch { throw; } return(response); }