Class Lease.LeaseClient
Client for Lease
Inheritance
Namespace: Etcdserverpb
Assembly: cs.temp.dll.dll
Syntax
public class LeaseClient : grpc.ClientBase<Lease.LeaseClient>
Constructors
LeaseClient()
Protected parameterless constructor to allow creation of test doubles.
Declaration
protected LeaseClient()
LeaseClient(ClientBaseConfiguration)
Protected constructor to allow creation of configured clients.
Declaration
protected LeaseClient(ClientBaseConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
ClientBaseConfiguration | configuration | The client configuration. |
LeaseClient(grpc.CallInvoker)
Creates a new client for Lease that uses a custom CallInvoker
.
Declaration
public LeaseClient(grpc.CallInvoker callInvoker)
Parameters
Type | Name | Description |
---|---|---|
grpc.CallInvoker | callInvoker | The callInvoker to use to make remote calls. |
LeaseClient(grpc.Channel)
Creates a new client for Lease
Declaration
public LeaseClient(grpc.Channel channel)
Parameters
Type | Name | Description |
---|---|---|
grpc.Channel | channel | The channel to use to make remote calls. |
Methods
LeaseGrant(LeaseGrantRequest, grpc.CallOptions)
LeaseGrant creates a lease which expires if the server does not receive a keepAlive within a given time to live period. All keys attached to the lease will be expired and deleted if the lease expires. Each expired key generates a delete event in the event history.
Declaration
public virtual LeaseGrantResponse LeaseGrant(LeaseGrantRequest request, grpc.CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
LeaseGrantRequest | request | The request to send to the server. |
grpc.CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
LeaseGrantResponse | The response received from the server. |
LeaseGrant(LeaseGrantRequest, grpc.Metadata, Nullable<DateTime>, CancellationToken)
LeaseGrant creates a lease which expires if the server does not receive a keepAlive within a given time to live period. All keys attached to the lease will be expired and deleted if the lease expires. Each expired key generates a delete event in the event history.
Declaration
public virtual LeaseGrantResponse LeaseGrant(LeaseGrantRequest request, grpc.Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
LeaseGrantRequest | request | The request to send to the server. |
grpc.Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
System.Nullable<DateTime> | deadline | An optional deadline for the call. The call will be cancelled if deadline is hit. |
CancellationToken | cancellationToken | An optional token for canceling the call. |
Returns
Type | Description |
---|---|
LeaseGrantResponse | The response received from the server. |
LeaseGrantAsync(LeaseGrantRequest, grpc.CallOptions)
LeaseGrant creates a lease which expires if the server does not receive a keepAlive within a given time to live period. All keys attached to the lease will be expired and deleted if the lease expires. Each expired key generates a delete event in the event history.
Declaration
public virtual grpc.AsyncUnaryCall<LeaseGrantResponse> LeaseGrantAsync(LeaseGrantRequest request, grpc.CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
LeaseGrantRequest | request | The request to send to the server. |
grpc.CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
grpc.AsyncUnaryCall<LeaseGrantResponse> | The call object. |
LeaseGrantAsync(LeaseGrantRequest, grpc.Metadata, Nullable<DateTime>, CancellationToken)
LeaseGrant creates a lease which expires if the server does not receive a keepAlive within a given time to live period. All keys attached to the lease will be expired and deleted if the lease expires. Each expired key generates a delete event in the event history.
Declaration
public virtual grpc.AsyncUnaryCall<LeaseGrantResponse> LeaseGrantAsync(LeaseGrantRequest request, grpc.Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
LeaseGrantRequest | request | The request to send to the server. |
grpc.Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
System.Nullable<DateTime> | deadline | An optional deadline for the call. The call will be cancelled if deadline is hit. |
CancellationToken | cancellationToken | An optional token for canceling the call. |
Returns
Type | Description |
---|---|
grpc.AsyncUnaryCall<LeaseGrantResponse> | The call object. |
LeaseKeepAlive(grpc.CallOptions)
LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client to the server and streaming keep alive responses from the server to the client.
Declaration
public virtual grpc.AsyncDuplexStreamingCall<LeaseKeepAliveRequest, LeaseKeepAliveResponse> LeaseKeepAlive(grpc.CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
grpc.CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
grpc.AsyncDuplexStreamingCall<LeaseKeepAliveRequest, LeaseKeepAliveResponse> | The call object. |
LeaseKeepAlive(grpc.Metadata, Nullable<DateTime>, CancellationToken)
LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client to the server and streaming keep alive responses from the server to the client.
Declaration
public virtual grpc.AsyncDuplexStreamingCall<LeaseKeepAliveRequest, LeaseKeepAliveResponse> LeaseKeepAlive(grpc.Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
grpc.Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
System.Nullable<DateTime> | deadline | An optional deadline for the call. The call will be cancelled if deadline is hit. |
CancellationToken | cancellationToken | An optional token for canceling the call. |
Returns
Type | Description |
---|---|
grpc.AsyncDuplexStreamingCall<LeaseKeepAliveRequest, LeaseKeepAliveResponse> | The call object. |
LeaseRevoke(LeaseRevokeRequest, grpc.CallOptions)
LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
Declaration
public virtual LeaseRevokeResponse LeaseRevoke(LeaseRevokeRequest request, grpc.CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
LeaseRevokeRequest | request | The request to send to the server. |
grpc.CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
LeaseRevokeResponse | The response received from the server. |
LeaseRevoke(LeaseRevokeRequest, grpc.Metadata, Nullable<DateTime>, CancellationToken)
LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
Declaration
public virtual LeaseRevokeResponse LeaseRevoke(LeaseRevokeRequest request, grpc.Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
LeaseRevokeRequest | request | The request to send to the server. |
grpc.Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
System.Nullable<DateTime> | deadline | An optional deadline for the call. The call will be cancelled if deadline is hit. |
CancellationToken | cancellationToken | An optional token for canceling the call. |
Returns
Type | Description |
---|---|
LeaseRevokeResponse | The response received from the server. |
LeaseRevokeAsync(LeaseRevokeRequest, grpc.CallOptions)
LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
Declaration
public virtual grpc.AsyncUnaryCall<LeaseRevokeResponse> LeaseRevokeAsync(LeaseRevokeRequest request, grpc.CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
LeaseRevokeRequest | request | The request to send to the server. |
grpc.CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
grpc.AsyncUnaryCall<LeaseRevokeResponse> | The call object. |
LeaseRevokeAsync(LeaseRevokeRequest, grpc.Metadata, Nullable<DateTime>, CancellationToken)
LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
Declaration
public virtual grpc.AsyncUnaryCall<LeaseRevokeResponse> LeaseRevokeAsync(LeaseRevokeRequest request, grpc.Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
LeaseRevokeRequest | request | The request to send to the server. |
grpc.Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
System.Nullable<DateTime> | deadline | An optional deadline for the call. The call will be cancelled if deadline is hit. |
CancellationToken | cancellationToken | An optional token for canceling the call. |
Returns
Type | Description |
---|---|
grpc.AsyncUnaryCall<LeaseRevokeResponse> | The call object. |
LeaseTimeToLive(LeaseTimeToLiveRequest, grpc.CallOptions)
LeaseTimeToLive retrieves lease information.
Declaration
public virtual LeaseTimeToLiveResponse LeaseTimeToLive(LeaseTimeToLiveRequest request, grpc.CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
LeaseTimeToLiveRequest | request | The request to send to the server. |
grpc.CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
LeaseTimeToLiveResponse | The response received from the server. |
LeaseTimeToLive(LeaseTimeToLiveRequest, grpc.Metadata, Nullable<DateTime>, CancellationToken)
LeaseTimeToLive retrieves lease information.
Declaration
public virtual LeaseTimeToLiveResponse LeaseTimeToLive(LeaseTimeToLiveRequest request, grpc.Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
LeaseTimeToLiveRequest | request | The request to send to the server. |
grpc.Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
System.Nullable<DateTime> | deadline | An optional deadline for the call. The call will be cancelled if deadline is hit. |
CancellationToken | cancellationToken | An optional token for canceling the call. |
Returns
Type | Description |
---|---|
LeaseTimeToLiveResponse | The response received from the server. |
LeaseTimeToLiveAsync(LeaseTimeToLiveRequest, grpc.CallOptions)
LeaseTimeToLive retrieves lease information.
Declaration
public virtual grpc.AsyncUnaryCall<LeaseTimeToLiveResponse> LeaseTimeToLiveAsync(LeaseTimeToLiveRequest request, grpc.CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
LeaseTimeToLiveRequest | request | The request to send to the server. |
grpc.CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
grpc.AsyncUnaryCall<LeaseTimeToLiveResponse> | The call object. |
LeaseTimeToLiveAsync(LeaseTimeToLiveRequest, grpc.Metadata, Nullable<DateTime>, CancellationToken)
LeaseTimeToLive retrieves lease information.
Declaration
public virtual grpc.AsyncUnaryCall<LeaseTimeToLiveResponse> LeaseTimeToLiveAsync(LeaseTimeToLiveRequest request, grpc.Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
LeaseTimeToLiveRequest | request | The request to send to the server. |
grpc.Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
System.Nullable<DateTime> | deadline | An optional deadline for the call. The call will be cancelled if deadline is hit. |
CancellationToken | cancellationToken | An optional token for canceling the call. |
Returns
Type | Description |
---|---|
grpc.AsyncUnaryCall<LeaseTimeToLiveResponse> | The call object. |
NewInstance(ClientBaseConfiguration)
Creates a new instance of client from given ClientBaseConfiguration
.
Declaration
protected override Lease.LeaseClient NewInstance(ClientBaseConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
ClientBaseConfiguration | configuration |
Returns
Type | Description |
---|---|
Lease.LeaseClient |