MCPcopy Index your code
hub / github.com/tailscale/tailscale / PolicyClientOrDefault

Method PolicyClientOrDefault

tsd/tsd.go:206–211  ·  view source on GitHub ↗

PolicyClientOrDefault returns the policy client if set or a no-op default otherwise. It always returns a non-nil value.

()

Source from the content-addressed store, hash-verified

204// PolicyClientOrDefault returns the policy client if set or a no-op default
205// otherwise. It always returns a non-nil value.
206func (s *System) PolicyClientOrDefault() policyclient.Client {
207 if client, ok := s.PolicyClient.GetOK(); ok {
208 return client
209 }
210 return policyclient.Get()
211}
212
213// SubSystem represents some subsystem of the Tailscale node daemon.
214//

Callers 4

tryEngineFunction · 0.80
serveShutdownMethod · 0.80
NewLocalBackendFunction · 0.80
startLockedMethod · 0.80

Calls 2

GetFunction · 0.92
GetOKMethod · 0.80

Tested by

no test coverage detected