connectToService(_:withFilter:clientFactory:serviceHandler:deadline:)

    To be used to connect to a single service of the particular type. Function returns the service endpoint instance after connection to service is established and service endpoint is ready for use.

    DistributedSystem.swift:617
    func connectToService<S, C>(_ serviceEndpointType: S.Type, withFilter serviceFilter: @escaping ServiceFilter, clientFactory: ((DistributedSystem) -> C)?, serviceHandler: ((S, ConsulServiceDiscovery.Instance) -> Void)? = nil, deadline: DispatchTime? = nil) async throws -> S 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

    service endpoint

    Other members in extension

    Types

    Typealiases

    Type members

    Instance members