package leader
- Alphabetic
- By Inheritance
- leader
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
case class
ApplicationError[E](error: E) extends LeaderElectionFailure[E] with Product with Serializable
Inner effect failed
-
final
case class
ContextInfoError(error: ContextInfoFailure) extends LeaderElectionFailure[Nothing] with Product with Serializable
Failure while gathering information about the running service
-
final
case class
KubernetesError(error: K8sFailure) extends LeaderElectionFailure[Nothing] with Product with Serializable
Failure while calling the Kubernetes API
- type LeaderElection = Service
-
sealed
trait
LeaderElectionFailure[+E] extends AnyRef
Possible failures of the leader election algorithm
Possible failures of the leader election algorithm
- E
Failure type of the inner effect
-
trait
LeaderLock extends AnyRef
Common interface for different lock implementations used for leader election.
Value Members
-
def
lease: ZIO[LeaderElection, LeaderElectionFailure[Nothing], Unit]
Creates a managed lock implementing the leader election algorithm
-
def
runAsLeader[R, E, A](f: ZIO[R, E, A]): ZIO[R with LeaderElection, E, Option[A]]
Runs the given effect by applying the leader election algorithm, with the guarantee that the inner effect will only run at once in the Kubernetes cluster.
Runs the given effect by applying the leader election algorithm, with the guarantee that the inner effect will only run at once in the Kubernetes cluster.
If you want to manage the lock as Scoped use lease()
- f
Inner effect to protect
- object LeaderElection