commands

package
v0.0.0-...-023fe20 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HTTPCommand = &cli.Command{
	Name:  "http",
	Usage: "Check if the target address is accessible via HTTP.",
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:    "timeout",
			Aliases: []string{"t"},
			Value:   1,
			Usage:   "Time to wait for a response in seconds.",
		},
	},
	Action: httpAction,
}

HTTPCommand represents a command in the CLI that checks HTTP or HTTPS connection.

View Source
var PingCommand = &cli.Command{
	Name:    "ping",
	Aliases: []string{"icmp"},
	Usage:   "Check if the target address is accessible via ICMP protocol.",
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:    "count",
			Aliases: []string{"c"},
			Value:   1,
			Usage:   "Amount of ping requests that will be sent.",
		},
		&cli.IntFlag{
			Name:    "timeout",
			Aliases: []string{"t"},
			Value:   1,
			Usage:   "Time to wait for a response in seconds.",
		},
		&cli.IntFlag{
			Name:    "interval",
			Aliases: []string{"i"},
			Value:   1,
			Usage:   "Time to wait between ping requests in seconds if the count is more than 1.",
		},
		&cli.BoolFlag{
			Name:    "verbose",
			Aliases: []string{"v"},
			Value:   false,
			Usage:   "Specifies whether to show verbose information about the ping result.",
		},
	},
	Action: pingAction,
}

PingCommand represents the 'ping' or 'icmp' commnand options for the CLI.

View Source
var SSHCommand = &cli.Command{
	Name:  "ssh",
	Usage: "Check if the target address is accessible via SSH.",
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:    "timeout",
			Aliases: []string{"t"},
			Value:   1,
			Usage:   "Time to wait for a response in seconds.",
		},
	},
	Action: sshAction,
}

SSHCommand represents a command in the CLI that checks SSH connection.

View Source
var TCPCommand = &cli.Command{
	Name:  "tcp",
	Usage: "Check if the target address is accessible via TCP.",
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:    "timeout",
			Aliases: []string{"t"},
			Value:   1,
			Usage:   "Time to wait for a response in seconds.",
		},
	},
	Action: tcpAction,
}

TCPCommand represents a command in the CLI that checks TCP connection.

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