forked from mackerelio/mackerel-agent-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flags.go
40 lines (34 loc) · 750 Bytes
/
flags.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package mpphpopcache
import (
"github.com/urfave/cli"
)
var flags = []cli.Flag{
cliHTTPHost,
cliHTTPPort,
cliStatusPage,
cliTempFile,
}
var cliHTTPHost = cli.StringFlag{
Name: "http_host, o",
Value: "127.0.0.1",
Usage: "Set httpd listeing ip.",
EnvVar: "ENVVAR_HTTP_HOST",
}
var cliHTTPPort = cli.IntFlag{
Name: "http_port, p",
Value: 80,
Usage: "Set httpd listeing port.",
EnvVar: "ENVVAR_HTTP_PORT",
}
var cliStatusPage = cli.StringFlag{
Name: "status_page, s",
Value: "/mackerel/php-opcache.php",
Usage: "Set httpd mod_status page address.",
EnvVar: "ENVVAR_STATUS_PAGE",
}
var cliTempFile = cli.StringFlag{
Name: "tempfile, t",
Value: "",
Usage: "Set temporary file path.",
EnvVar: "ENVVAR_TEMPFILE",
}