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

Function runApp

cmd/cloudflared/macos_service.go:21–39  ·  view source on GitHub ↗
(app *cli.App, _ chan struct{})

Source from the content-addressed store, hash-verified

19)
20
21func runApp(app *cli.App, _ chan struct{}) {
22 app.Commands = append(app.Commands, &cli.Command{
23 Name: "service",
24 Usage: "Manages the cloudflared launch agent",
25 Subcommands: []*cli.Command{
26 {
27 Name: "install",
28 Usage: "Install cloudflared as an user launch agent",
29 Action: cliutil.ConfiguredAction(installLaunchd),
30 },
31 {
32 Name: "uninstall",
33 Usage: "Uninstall the cloudflared launch agent",
34 Action: cliutil.ConfiguredAction(uninstallLaunchd),
35 },
36 },
37 })
38 _ = app.Run(os.Args)
39}
40
41func newLaunchdTemplate(installPath, stdoutPath, stderrPath string) *ServiceTemplate {
42 return &ServiceTemplate{

Callers 1

mainFunction · 0.70

Calls 2

ConfiguredActionFunction · 0.92
RunMethod · 0.65

Tested by

no test coverage detected