checkers

package
v0.0.0-...-655f602 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckResult

type CheckResult struct {
	Ok       bool
	Error    error
	Producer string
}

type Checker

type Checker interface {
	Run(context.Context, chan<- *CheckResult)
}

func NewCommandChecker

func NewCommandChecker(timeout time.Duration, command string) (Checker, error)

func NewNetworkChecker

func NewNetworkChecker(timeout time.Duration, urlstruct *url.URL, codes []int) (Checker, error)

func NewShellChecker

func NewShellChecker(timeout time.Duration, command string) (Checker, error)

type CommandChecker

type CommandChecker struct {
	Exec []string
	// contains filtered or unexported fields
}

func (*CommandChecker) Run

func (cc *CommandChecker) Run(ctx context.Context, results chan<- *CheckResult)

func (*CommandChecker) StrCommand

func (cc *CommandChecker) StrCommand() string

type HTTPNetworkChecker

type HTTPNetworkChecker struct {
	NetworkChecker
}

func (*HTTPNetworkChecker) Run

func (hnc *HTTPNetworkChecker) Run(ctx context.Context, results chan<- *CheckResult)

type NetworkChecker

type NetworkChecker struct {
	URL         *url.URL
	StatusCodes []int
	// contains filtered or unexported fields
}

type TCPNetworkChecker

type TCPNetworkChecker struct {
	NetworkChecker
}

func (*TCPNetworkChecker) Run

func (tnc *TCPNetworkChecker) Run(ctx context.Context, results chan<- *CheckResult)

Jump to

Keyboard shortcuts

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