lookup(_:deadline:callback:)

Performs a lookup for the given service’s instances. The result will be sent to callback.

ServiceDiscovery.swift:46
@preconcurrency func lookup(_ service: Service, deadline: DispatchTime?, callback: @escaping (Result<[Instance], Error>) -> Void)

Parameters

service

The service to lookup

deadline

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

callback

The closure to receive lookup result

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

Threading

callback may be invoked on arbitrary threads, as determined by implementation.