Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

=doc explain waiting for joined nodes better, fix link #1070 #1072

Merged
merged 1 commit into from
Oct 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Sources/DistributedActors/Docs.docc/Clustering.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ system.cluster.join(node: Node(systemName: "JoiningExample", host: "127.0.0.1",
> an ``UniqueNode`` is a node that we have contacted and know its exact unique node identifier. Therefore, when reaching
> out to a node we know nothing about just yet, we use the `Node` type.

You can observe <doc:#Cluster-events> in order to see when a node has been successfully joined.
You can observe ``Cluster/Event``s emitted by `system.cluster.events` (``ClusterControl/events``) in order to see when a node has been successfully joined.

> **TODO:** Pending addition of an async/await based API to await joining the cluster successfully. [#948](https://github.com/apple/swift-distributed-actors/issues/948)
There is also convenience APIs available on ``ClusterControl`` (`system.cluster`):
- ``ClusterControl/joined(node:within:)-2cla8`` which allows you to suspend until a specific node becomes ``Cluster/MemberStatus/joining`` in the cluster membership, or
- ``ClusterControl/waitFor(_:_:within:)-spiq`` which allows you to suspend until a node reaches a specific ``Cluster/MemberStatus``.

### Automatic Node Discovery

Expand Down