MCPcopy
hub / github.com/tailscale/tailscale / Lock

Method Lock

util/syspolicy/source/policy_source.go:61–61  ·  view source on GitHub ↗

Lock acquires a read lock on the policy store, ensuring the store's state remains unchanged while locked. Multiple readers can hold the lock simultaneously. It returns an error if the store cannot be locked.

()

Source from the content-addressed store, hash-verified

59 // Multiple readers can hold the lock simultaneously.
60 // It returns an error if the store cannot be locked.
61 Lock() error
62 // Unlock unlocks the policy store.
63 // It is a run-time error if the store is not locked on entry to Unlock.
64 Unlock()

Callers 15

TestAllocEphemeralFunction · 0.65
getCertMethod · 0.65
closeMethod · 0.65
listenerForDstAddrMethod · 0.65
getTCPHandlerForFlowMethod · 0.65
CloseMethod · 0.65
advertiseServiceMethod · 0.65
ListenServiceMethod · 0.65
registerListenerMethod · 0.65
CloseMethod · 0.65
onReadyMethod · 0.65

Implementers 4

TestStoreutil/syspolicy/source/test_store.go
PlatformPolicyStoreutil/syspolicy/source/policy_store_win
optionalPolicyLockutil/syspolicy/source/policy_store_win
PolicyLockutil/winutil/gp/policylock_windows.go

Calls

no outgoing calls

Tested by 15

TestAllocEphemeralFunction · 0.52
getCertMethod · 0.52
StartMethod · 0.52
CloseMethod · 0.52
dialAndRecordMethod · 0.52
ConnIsFromProxyMethod · 0.52
StartMethod · 0.52
CloseMethod · 0.52
dialAndRecordMethod · 0.52
ConnIsFromProxyMethod · 0.52
DialMethod · 0.52