Distributed provides Swift standard library support for distributed actors that communicate across process or network boundaries through pluggable actor systems. You declare an actor that conforms to DistributedActor and run it on a transport that conforms to DistributedActorSystem, which encodes and decodes remote calls using DistributedTargetInvocationEncoder, DistributedTargetInvocationDecoder, and DistributedTargetInvocationResultHandler to carry RemoteCallArgument values to a RemoteCallTarget. Failures surface through dedicated error types such as DistributedActorCodingError, DistributedActorSystemError, and ExecuteDistributedTargetError. For development and unit tests, LocalTestingDistributedActorSystem and its associated LocalTestingActorID, encoder, decoder, and result handler let you exercise distributed actors within a single process.
Distributed Actors 1
The core protocol for declaring actors whose methods can be invoked across process or network boundaries.
- PrDistributedActoriOS 16.0+Common protocol to which all distributed actors conform implicitly.
Actor Systems 1
The pluggable transport protocol that locates distributed actors and carries remote calls between them.
- PrDistributedActorSystemiOS 16.0+A distributed actor system underpins and implements all functionality of distributed actors.
Remote Call Invocation 5
Protocols and types that encode, decode, and dispatch the arguments and results of a remote distributed call.
- PrDistributedTargetInvocationEncoderiOS 16.0+Used to encode an invocation of a distributed target (method or computed property).
- PrDistributedTargetInvocationDecoderiOS 16.0+Decoder that must be provided to `executeDistributedTarget` and is used
- PrDistributedTargetInvocationResultHandleriOS 16.0+Protocol a distributed invocation execution's result handler.
- StRemoteCallArgumentiOS 16.0+Represents an argument passed to a distributed call target.
- StRemoteCallTargetiOS 16.0+Represents a 'target' of a distributed call, such as a `distributed func` or
Local Testing Actor System 5
An in-process actor system and its invocation machinery for exercising distributed actors in development and unit tests.
- ClLocalTestingDistributedActorSystemiOS 16.0+A `DistributedActorSystem` designed for local only testing.
- StLocalTestingActorIDiOS 16.0+An identity that uniquely names a distributed actor within the local testing actor system.
- StLocalTestingInvocationEncoderiOS 16.0+An invocation encoder that records the arguments of a distributed call for the local testing actor system.
- ClLocalTestingInvocationDecoderiOS 16.0+An invocation decoder that reads recorded arguments of a distributed call for the local testing actor system.
- StLocalTestingInvocationResultHandleriOS 16.0+A result handler that returns the outcome of a distributed call for the local testing actor system.
Errors 4
Error protocols and types that report failures encountered while coding, executing, or transporting distributed calls.
- PrDistributedActorSystemErroriOS 16.0+Error protocol to which errors thrown by any `DistributedActorSystem` should conform.
- StDistributedActorCodingErroriOS 16.0+Error thrown by distributed actor systems while encountering encoding/decoding
- StExecuteDistributedTargetErroriOS 16.0+Error thrown by ``DistributedActorSystem/executeDistributedTarget(on:target:invocationDecoder:handler:)``.
- StLocalTestingDistributedActorSystemErroriOS 16.0+An error thrown by the local testing distributed actor system.
Type Aliases 1
- TyLocalTestingActorAddress