mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-19 08:46:38 +00:00
docs: minor FilesStore corrections
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
|||||||
// storeFileName Store file name. Stored in the datadir
|
// storeFileName Store file name. Stored in the datadir
|
||||||
const storeFileName = "store.json"
|
const storeFileName = "store.json"
|
||||||
|
|
||||||
// Store represents an account storage
|
// FileStore represents an account storage backed by a file persisted to disk
|
||||||
type FileStore struct {
|
type FileStore struct {
|
||||||
Accounts map[string]*Account
|
Accounts map[string]*Account
|
||||||
SetupKeyId2AccountId map[string]string `json:"-"`
|
SetupKeyId2AccountId map[string]string `json:"-"`
|
||||||
@@ -74,7 +74,7 @@ func (s *FileStore) persist(file string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AddPeer adds peer to the store and associates it with a Account and a SetupKey. Returns related Account
|
// AddPeer adds peer to the store and associates it with a Account and a SetupKey. Returns related Account
|
||||||
// Each Account has a list of pre-authorised SetupKey and if no Account has a given key nil will be returned, meaning the key is invalid
|
// Each Account has a list of pre-authorised SetupKey and if no Account has a given key err will be returned, meaning the key is invalid
|
||||||
func (s *FileStore) AddPeer(setupKey string, peerKey string) error {
|
func (s *FileStore) AddPeer(setupKey string, peerKey string) error {
|
||||||
s.mux.Lock()
|
s.mux.Lock()
|
||||||
defer s.mux.Unlock()
|
defer s.mux.Unlock()
|
||||||
|
|||||||
Reference in New Issue
Block a user