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