mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-19 17:31:39 +02:00
docs: minor FilesStore corrections
This commit is contained in:
parent
7b52049333
commit
4e17890597
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user