Live

com.coralogix.zio.k8s.operator.leader.package$.LeaderElection$.Live
class Live(contextInfo: Service, lock: LeaderLock) extends Service

Attributes

Graph
Supertypes
trait Service
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def lease: ZIO[Any, LeaderElectionFailure[Nothing], Unit]

Creates a managed lock implementing the leader election algorithm

Creates a managed lock implementing the leader election algorithm

Attributes

Definition Classes

Inherited methods

def runAsLeader[R, E, A](f: ZIO[R, E, A]): ZIO[R & Any, 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

Value parameters

f

Inner effect to protect

Attributes

Inherited from:
Service