[Distributed] Implementing calling transport in resolve and assigning id/transp

This commit is contained in:
Konrad `ktoso` Malawski
2021-08-10 22:18:38 +09:00
parent a965abd7f0
commit 7e0a3eba13
15 changed files with 276 additions and 122 deletions

View File

@@ -48,8 +48,11 @@ public protocol DistributedActor:
///
/// - Parameter identity: identity uniquely identifying a, potentially remote, actor in the system
/// - Parameter transport: `transport` which should be used to resolve the `identity`, and be associated with the returned actor
static func resolve<Identity>(_ identity: Identity, using transport: ActorTransport)
throws -> Self where Identity: ActorIdentity
// FIXME: move to generic identity here; depends on
// static func resolve<Identity>(_ identity: Identity, using transport: ActorTransport)
// throws -> Self where Identity: ActorIdentity
static func resolve(_ identity: AnyActorIdentity, using transport: ActorTransport)
throws -> Self
/// The `ActorTransport` associated with this actor.
/// It is immutable and equal to the transport passed in the local/resolve