generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expose leases to user code (#1406)
[Leases](https://hackmd.io/@ftl/Sym_GKEb0) provide exclusive access to a resource identified by a unique key with a timeout. If the timeout expires due to the lease holder terminating, the lease will be released. Usage is straightforward: ```go lease, err := ftl.Lease(ctx, 10*time.Second, "update", "user", "123") if err != nil { return err } defer lease.Release() // ... ``` Note that leases are currently not tracked in the schema.
- Loading branch information
1 parent
acece7b
commit 98db787
Showing
46 changed files
with
1,492 additions
and
798 deletions.
There are no files selected for viewing
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
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
Oops, something went wrong.