Cluster

io.github.jchapuis.leases4s.patterns.cluster.Cluster
trait Cluster[F[_]]

A cluster represents a dynamic group of indexed members that join and leave. A member's index can evolve over time. Indices are indeed always lower than the number of members at any one time. Indices thus represent a slot in the group and can be used to partition work or data.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def changes: Stream[F, List[Member]]
def join(member: Member): Resource[F, Membership[F]]

Join the cluster with membership represented by resource scope. Resource release leads to leaving the cluster.

Join the cluster with membership represented by resource scope. Resource release leads to leaving the cluster.

Attributes

Returns

a stream of updates to the membership "card" as members join and leave

Note

semantically blocks until the cluster membership is established.

while the resource is held, cluster membership is actively maintained, even in case of loss of connectivity with the Kubernetes API.

def members: F[List[Member]]