checker

package
v0.0.0-...-30d36b7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CheckerCommand = cli.Command{
	Name:        "checker",
	Usage:       "sub-commands check to see if a status-enabled service is live or ready",
	Subcommands: CheckerSubCommands,
	Flags:       CheckerFlags,
}

CheckerCommand is the command with live and readiness subcommands, and the root flags.

View Source
var CheckerFlags = []cli.Flag{
	cli.StringFlag{
		Name:        "endpoint",
		Usage:       "the grpc endpoint to contact",
		Destination: &cliArgs.Endpoint,
		Value:       "localhost:5000",
	},
	cli.BoolTFlag{
		Name:        "fail-fast",
		Usage:       "If set, don't wait for the timeout to fail, but fail quickly.",
		Destination: &cliArgs.FailFast,
	},
	cli.IntFlag{
		Name:        "timeout-seconds",
		Usage:       "sets the seconds to wait for the call to go through",
		Destination: &cliArgs.TimeoutSeconds,
		Value:       3,
	},
}

CheckerFlags are the flags of the checker command.

View Source
var CheckerSubCommands = []cli.Command{
	cli.Command{
		Name:  "ready",
		Usage: "checks to see if the GRPC service is ready",
		Action: func(c *cli.Context) error {
			return performChecks(false)
		},
	},
	cli.Command{
		Name:  "live",
		Usage: "checks to see if the GRPC service is alive",
		Action: func(c *cli.Context) error {
			return performChecks(true)
		},
	},
}

CheckerSubCommands are the subcommands for the checker cli.

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