mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
Save Peer Status separately in the FileStore (#554)
Due to peer reconnects when restarting the Management service, there are lots of SaveStore operations to update peer status. Store.SavePeerStatus stores peer status separately and the FileStore implementation stores it in memory.
This commit is contained in:
@@ -9,9 +9,12 @@ type Store interface {
|
||||
GetAccountByPrivateDomain(domain string) (*Account, error)
|
||||
SaveAccount(account *Account) error
|
||||
GetInstallationID() string
|
||||
SaveInstallationID(id string) error
|
||||
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()
|
||||
SavePeerStatus(accountID, peerKey string, status PeerStatus) error
|
||||
// Close should close the store persisting all unsaved data.
|
||||
Close() error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user