lookup(_:deadline:)

Performs async lookup for the given service’s instances.

ServiceDiscovery+AsyncAwait.swift:27
iOS
15+
macOS
12+
tvOS
15+
watchOS
8+
func lookup(_ service: Service, deadline: DispatchTime? = nil) async throws -> [Instance]

Parameters

service

The service to lookup

deadline

Lookup is considered to have timed out if it does not complete by this time

Returns

A listing of service instances.

Throws

An error if the lookup fails.

defaultLookupTimeout will be used to compute deadline in case one is not specified.