CancellationToken
DistributedSystem.swift:129final class CancellationToken
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (29) members.
Types
Typealiases
typealias ActorID
typealias InvocationDecoder
typealias InvocationEncoder
typealias ResultHandler
typealias SerializationRequirement
typealias ServiceFactory
typealias ServiceFilter
Type members
init(name: String, addressTag: String?, compressionMode: CompressionMode, logLevel: Logger.Level
) init(systemName: String, addressTag: String?, compressionMode: CompressionMode, logLevel: Logger.Level
)
Instance members
let consulServiceDiscovery: ConsulServiceDiscovery
var logger: Logger
var loggerBox: Box<Logger>
let systemName: String
func actorReady<Actor>(Actor
) func assignID<Actor>(Actor.Type
) -> EndpointIdentifier func connectToService<S, C>(S.Type, withFilter: @escaping ServiceFilter, clientFactory: ((DistributedSystem) -> C)?, serviceHandler: ((S, ConsulServiceDiscovery.Instance) -> Void)?, deadline: DispatchTime?
) async throws -> S 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.
func connectToService<S>(S.Type, withFilter: @escaping ServiceFilter, serviceHandler: ((S, ConsulServiceDiscovery.Instance) -> Void)?, deadline: DispatchTime?
) async throws -> S 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.
func connectToServices<S, C>(S.Type, withFilter: @escaping ServiceFilter, clientFactory: ((DistributedSystem, ConsulServiceDiscovery.Instance) -> C)?, serviceHandler: @escaping (S, ConsulServiceDiscovery.Instance) -> Void, cancellationToken: CancellationToken?
) -> Bool To be used to connect to multiple services of the same type. Service will be discovered with using a discovery system (consul by default).
func getBytesSent(
) async throws -> UInt64 func makeCancellationToken(
) -> CancellationToken func makeInvocationEncoder(
) -> RemoteCallEncoder func remoteCall<Actor, Err, Res>(on: Actor, target: RemoteCallTarget, invocation: inout InvocationEncoder, throwing: Err.Type, returning: Res.Type
) async throws -> Res func remoteCallVoid<Actor, Err>(on: Actor, target: RemoteCallTarget, invocation: inout InvocationEncoder, throwing: Err.Type
) async throws func resignID(EndpointIdentifier
) func resolve<Actor>(id: EndpointIdentifier, as: Actor.Type
) throws -> Actor? func start(
) throws Service lifecycle start
func stop(
) Service lifecycle stop
Citizens in DistributedSystem
Conformances
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.
Type members
static func == (lhs: DistributedSystem.CancellationToken, rhs: DistributedSystem.CancellationToken
) -> Bool
Instance members
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.