(ctx context.Context, debug *tailcfg.Debug)
| 1427 | } |
| 1428 | |
| 1429 | func (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. |
nothing calls this directly
no test coverage detected