MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / buildCreateCommand

Function buildCreateCommand

cmd/cloudflared/tunnel/subcommands.go:251–266  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249)
250
251func buildCreateCommand() *cli.Command {
252 return &cli.Command{
253 Name: "create",
254 Action: cliutil.ConfiguredAction(createCommand),
255 Usage: "Create a new tunnel with given name",
256 UsageText: "cloudflared tunnel [tunnel command options] create [subcommand options] NAME",
257 Description: `Creates a tunnel, registers it with Cloudflare edge and generates credential file used to run this tunnel.
258 Use "cloudflared tunnel route" subcommand to map a DNS name to this tunnel and "cloudflared tunnel run" to start the connection.
259
260 For example, to create a tunnel named 'my-tunnel' run:
261
262 $ cloudflared tunnel create my-tunnel`,
263 Flags: []cli.Flag{outputFormatFlag, credentialsFileFlagCLIOnly, createSecretFlag},
264 CustomHelpTemplate: commandHelpTemplate(),
265 }
266}
267
268// generateTunnelSecret as an array of 32 bytes using secure random number generator
269func generateTunnelSecret() ([]byte, error) {

Callers 1

CommandsFunction · 0.85

Calls 2

ConfiguredActionFunction · 0.92
commandHelpTemplateFunction · 0.85

Tested by

no test coverage detected