MCPcopy Create free account
hub / github.com/PasarGuard/node / SyncUsers

Method SyncUsers

backend/wireguard/user.go:24–29  ·  view source on GitHub ↗

SyncUsers synchronizes multiple users to the WireGuard interface.

(_ context.Context, users []*common.User)

Source from the content-addressed store, hash-verified

22
23// SyncUsers synchronizes multiple users to the WireGuard interface.
24func (wg *WireGuard) SyncUsers(_ context.Context, users []*common.User) error {
25 wg.syncMu.Lock()
26 defer wg.syncMu.Unlock()
27
28 return wg.syncUsersFull(users)
29}
30
31// UpdateUsers performs partial reconciliation for users provided in the request.
32func (wg *WireGuard) UpdateUsers(_ context.Context, users []*common.User) error {

Calls 1

syncUsersFullMethod · 0.95