Created
August 12, 2024 09:56
-
-
Save jchapuis/77c2b671b71195d6817dfc550c645567 to your computer and use it in GitHub Desktop.
Lease repository abstraction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait LeaseRepository[F[_]]: | |
def labels: List[Label] | |
def acquire(id: LeaseID, holderID: HolderID, annotations: List[Annotation] = Nil)(implicit | |
parameters: LeaseParameters = LeaseParameters.Default | |
): Resource[F, HeldLease[F]] | |
def get(id: LeaseID): F[Option[Lease[F]]] | |
def list: F[List[Lease[F]]] | |
def watcher: fs2.Stream[F, LeaseEvent[F]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment