vertx / io.vertx.kotlin.servicediscovery / io.vertx.servicediscovery.ServiceDiscovery / getRecordAwait

# getRecordAwait

`suspend fun ServiceDiscovery.getRecordAwait(filter: JsonObject): Record?`

Lookups for a single record.

### Parameters

`filter` - the filter.

`resultHandler` - handler called when the lookup has been completed. When there are no matching record, the operation succeeds, but the async result has no result (null).

`suspend fun ServiceDiscovery.getRecordAwait(filter: Function<Record, Boolean>): Record?`

Lookups for a single record.

### Parameters

`filter` - the filter, must not be null. To return all records, use a function accepting all records

`resultHandler` - the result handler called when the lookup has been completed. When there are no matching record, the operation succeed, but the async result has no result.

`suspend fun ServiceDiscovery.getRecordAwait(filter: Function<Record, Boolean>, includeOutOfService: Boolean): Record?`

Lookups for a single record.

### Parameters

`filter` - the filter, must not be null. To return all records, use a function accepting all records

`includeOutOfService` - whether or not the filter accepts OUT OF SERVICE records

`resultHandler` - the result handler called when the lookup has been completed. When there are no matching record, the operation succeed, but the async result has no result.