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

Method handleDebugMessage

control/controlclient/direct.go:1429–1444  ·  view source on GitHub ↗
(ctx context.Context, debug *tailcfg.Debug)

Source from the content-addressed store, hash-verified

1427}
1428
1429func (c *Direct) handleDebugMessage(ctx context.Context, debug *tailcfg.Debug) error {
1430 if code := debug.Exit; code != nil {
1431 c.logf("exiting process with status %v per controlplane", *code)
1432 os.Exit(*code)
1433 }
1434 if buildfeatures.HasLogTail && debug.DisableLogTail {
1435 logtail.Disable()
1436 envknob.SetNoLogsNoSupport()
1437 }
1438 if sleep := time.Duration(debug.SleepSeconds * float64(time.Second)); sleep > 0 {
1439 if err := sleepAsRequested(ctx, c.logf, sleep, c.clock); err != nil {
1440 return err
1441 }
1442 }
1443 return nil
1444}
1445
1446// initDisplayNames mutates any tailcfg.Nodes in resp to populate their display names,
1447// calling InitDisplayNames on each.

Callers

nothing calls this directly

Calls 5

DisableFunction · 0.92
SetNoLogsNoSupportFunction · 0.92
sleepAsRequestedFunction · 0.85
logfMethod · 0.45
ExitMethod · 0.45

Tested by

no test coverage detected