Interface IDnsResolver
Resolves a bootstrap URI to a list of servers using DNS SRV lookup.
Namespace: Couchbase
Assembly: Couchbase.NetClient.dll
Syntax
public interface IDnsResolver
Methods
| Edit this page View SourceGetDnsSrvEntriesAsync(Uri, CancellationToken)
Resolve a bootstrap URI to a list of servers using DNS SRV lookup.
Declaration
Task<IEnumerable<HostEndpoint>> GetDnsSrvEntriesAsync(Uri bootstrapUri, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | bootstrapUri | Bootstrap URI to lookup. |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<HostEndpoint>> | A list of HostEndpoint objects, empty if the DNS SRV lookup fails. |
GetIpAddressAsync(string, CancellationToken)
Declaration
Task<IPAddress?> GetIpAddressAsync(string hostName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | hostName | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IPAddress> |