cli

package
v0.0.0-...-ade0808 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = cli.Commands{
	{
		Name:      "add-http",
		Usage:     "Add endpoints to checkup",
		Action:    addHTTPEndpoint,
		UsageText: "checklist add-http [command options] name url",
		Flags: append(
			defaultEndpointFlags,
			cli.StringFlag{
				Name:  "mustcontain",
				Value: "",
				Usage: "HTML content that a page should contain to determine whether a page is up or down",
			},
			cli.StringFlag{
				Name:  "mustnotcontain",
				Value: "",
				Usage: "HTML content that a page should not contain to determine whether a page is up or down",
			},
			cli.StringFlag{
				Name:  "headers",
				Value: "",
				Usage: "Http Headers to send along the check request",
			},
			cli.IntFlag{
				Name:  "upstatus",
				Value: 200,
				Usage: "Http status code to define a healthy page",
			},
		),
	},
	{
		Name:      "add-tcp",
		Usage:     "Add tcp endpoints to checkup",
		Action:    addTCPEndpoint,
		UsageText: "checklist add-http [command options] name url",
		Flags: append(
			defaultEndpointFlags,
			cli.BoolFlag{
				Name:  "tls-enabled",
				Usage: "Enable TLS connection to endpoint",
			},
			cli.StringFlag{
				Name:  "tls-ca",
				Value: "",
				Usage: "Certificate file to established tls connection",
			},
			cli.BoolFlag{
				Name:  "tls-skip-verify",
				Usage: "Skip verify tls certificate",
			},
			cli.Int64Flag{
				Name:  "timeout",
				Value: int64(3 * time.Second),
				Usage: "Timeout to established a tls connection",
			},
		),
	},
	{
		Name:      "add-dns",
		Usage:     "Add dns endpoints to checkup",
		Action:    addDNSEndpoint,
		UsageText: "checklist add-dns [command options] name url host",
		Flags: append(
			defaultEndpointFlags,
			cli.Int64Flag{
				Name:  "timeout",
				Value: int64(3 * time.Second),
				Usage: "Timeout to established a tls connection",
			},
		),
	},
	{
		Name:   "list",
		Usage:  "list endpoint",
		Action: listEndpoint,
	},
	{
		Name:   "delete",
		Usage:  "delete endpoint",
		Action: deleteEndpoint,
	},
}

Commands is a list of commands that will be used in main function of cli app

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL