MCPcopy
hub / github.com/cloudflare/cloudflared / managementTokenCommand

Function managementTokenCommand

cmd/cloudflared/tail/cmd.go:51–63  ·  view source on GitHub ↗
(c *cli.Context)

Source from the content-addressed store, hash-verified

49}
50
51func managementTokenCommand(c *cli.Context) error {
52 log := cliutil.CreateStderrLogger(c)
53
54 token, err := cliutil.GetManagementToken(c, log, cfapi.Logs, buildInfo)
55 if err != nil {
56 return err
57 }
58 tokenResponse := struct {
59 Token string `json:"token"`
60 }{Token: token}
61
62 return json.NewEncoder(os.Stdout).Encode(tokenResponse)
63}
64
65func buildTailCommand(subcommands []*cli.Command) *cli.Command {
66 return &cli.Command{

Callers

nothing calls this directly

Calls 3

CreateStderrLoggerFunction · 0.92
GetManagementTokenFunction · 0.92
EncodeMethod · 0.45

Tested by

no test coverage detected