connectToServices(_:withFilter:clientFactory:serviceHandler:cancellationToken:)

    To be used to connect to multiple services of the same type. Service will be discovered with using a discovery system (consul by default).

    DistributedSystem.swift:479
    @discardableResult func connectToServices<S, C>(_ serviceEndpointType: S.Type, withFilter serviceFilter: @escaping ServiceFilter, clientFactory: ((DistributedSystem, ConsulServiceDiscovery.Instance) -> C)? = nil, serviceHandler: @escaping (S, ConsulServiceDiscovery.Instance) -> Void, cancellationToken: CancellationToken? = nil) -> Bool where S : ServiceEndpoint, S.ActorSystem == DistributedSystem

    Parameters

    _

    serviceEndpointType - type of the service endpoint

    serviceFilter

    user can filter out services and create a distributed actors only to needed

    clientFactory

    a closure creating a client side endpoint instance

    serviceHandler

    a clusure getting an instance of the service endpoint and a service where the endpoint is connected to

    Returns

    false, if cancellation token was cancelled before the call

    Other members in extension

    Types

    Typealiases

    Type members

    Instance members