check

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RoundDuration

func RoundDuration(d time.Duration, digits int) time.Duration

Types

type Check

type Check struct {
	Name      string
	CheckFunc CheckFunction
	// contains filtered or unexported fields
}

func (*Check) Error

func (c *Check) Error() string

func (*Check) ExecutionTime

func (c *Check) ExecutionTime() time.Duration

func (*Check) Passed

func (c *Check) Passed() bool

func (*Check) Process

func (c *Check) Process()

func (*Check) RawResult

func (c *Check) RawResult() string

func (*Check) Result

func (c *Check) Result() string

type CheckFunction

type CheckFunction func() (string, error)

type CheckSuite

type CheckSuite struct {
	Name         string
	Checks       []*Check
	OnCompletion OnCompletionHook
	ErrOnSetup   error
	// contains filtered or unexported fields
}

func NewCheckSuite

func NewCheckSuite(name string) *CheckSuite

func (*CheckSuite) AddCheck

func (h *CheckSuite) AddCheck(name string, checkFunc CheckFunction) *Check

func (*CheckSuite) Passed

func (h *CheckSuite) Passed() bool

func (*CheckSuite) Print

func (h *CheckSuite) Print()

Print will send output straight to stdout.

func (*CheckSuite) Process

func (h *CheckSuite) Process(parentCtx context.Context)

func (*CheckSuite) RawResult

func (h *CheckSuite) RawResult() string

func (*CheckSuite) Result

func (h *CheckSuite) Result() string

type OnCompletionHook

type OnCompletionHook func()

Jump to

Keyboard shortcuts

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