method ClusterApi.on
Calls handler(member) when the membership changes in the way event names (polled twice a second; changes that happened
before the call are not reported).
Example:
fn watch() io, time {
cluster.on(ClusterEvent.MemberLeft, (m: ClusterMember) => print("{m.id.name} left"))
}pub(api) fn on<effect F>(event: ClusterEvent, handler: fn(ClusterMember) F)Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
event | ClusterEvent |
handler | fn(ClusterMember) F |
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/node.oxl:571