CoAkka Runtime · Swift 3.3.2

CoAkka Runtime · Swift cheat sheet

Look up the package, API shape, outcomes, and lifecycle; open the full lesson when you need the failure law.

Version and package

Package.swift
.package(
    url: "https://github.com/phuong-tran/coakka-runtime-swift.git",
    exact: "3.3.2"
)
Connector
3.3.2: Core generation 3.3, connector revision 2.
Toolchain
Swift 6+.
Stable native targets
macOS ARM64, Linux ARM64/x64, Windows x64. Windows ARM64 remains preview/evaluation; wording must not promote it to stable.
Owner
RuntimeHost; close() may throw.

Embedded request/reply

Swift
let runtime = try RuntimeHost.startLocal(
    systemName: "orders",
    target: "orders.quote",
    nodeID: "orders-1"
)
try runtime.registerTextHandler("orders.quote") { quantity in quote(quantity) }
let reply = try runtime.askText(
    source: "checkout",
    target: "orders.quote",
    payload: "2",
    timeoutMs: 2_000
)

Open the first runnable package.

Outcomes and Deadletter

Reply
askText and ask return a correlated terminal response.
Deadletter
Match RuntimeError.deadletter(let value); the value carries the reason and original-envelope facts.
Timeout/cancel
A separate failure boundary; it does not prove that the handler never ran.
OneWay
Waits for no business response but still has admission and observability evidence.
Classification
Switch on typed RuntimeError; do not parse description.

Direct peers

Service
network: .networkNode(
    bindHost: "0.0.0.0",
    bindPort: 19_321,
    advertiseHost: "pricing.internal",
    advertisePort: 19_321
)
Caller
routes: [.remote(
    "orders.quote",
    host: "pricing.internal",
    port: 19_321
)],
network: .outboundOnly()

Open the two-process example.

File Lane and Stream Lane

File sample · Stream sample

Monitor and effective state

enableMonitor: true
Startup intent.
startupConfig()
Core-accepted Monitor and default facts.
health() / stats()
Observed runtime state and counters.
runtimeConfig()
Generation, routes, and state.
API boundary
Swift 3.3.2 does not project a Monitor wait API; do not copy methods from another connector.

Integration checklist

Open the Swift configuration reference.