Live

class Live(contextInfo: Service, lock: LeaderLock) extends Service
trait Service
class Object
trait Matchable
class Any

Value members

Concrete methods

override
def lease: ZManaged[Clock & Logging, LeaderElectionFailure[Nothing], Unit]
Definition Classes

Inherited methods

def runAsLeader[R, E, A](f: ZIO[R, E, A]): ZIO[R & Clock & Logging, 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 a ZManaged use lease

Value Params
f

Inner effect to protect

Inherited from
Service