Introduce locking on the account level (#548)

This commit is contained in:
Misha Bragin
2022-11-07 17:52:23 +01:00
committed by GitHub
parent 1f845f466c
commit ed7ac81027
14 changed files with 200 additions and 166 deletions

View File

@@ -10,4 +10,8 @@ type Store interface {
SaveAccount(account *Account) error
GetInstallationID() string
SaveInstallationID(id string) error
// AcquireAccountLock should attempt to acquire account lock and return a function that releases the lock
AcquireAccountLock(accountID string) func()
// AcquireGlobalLock should attempt to acquire a global lock and return a function that releases the lock
AcquireGlobalLock() func()
}