checks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInterrupted = errors.New("interrupted")

Functions

This section is empty.

Types

type CheckResult

type CheckResult string
const (
	CheckResultPending CheckResult = "Pending"
	CheckResultPassing CheckResult = "Passing"
	CheckResultFailing CheckResult = "Failing"
)

type CheckSummary

type CheckSummary struct {
	Description string
	Result      CheckResult
	Details     string
	Timestamp   time.Time
}

type Checker

type Checker interface {
	Description() string
	Check(interruptCh <-chan struct{}) (*CheckSummary, error)
	Period() time.Duration
}

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(opts ...RunnerOption) *Runner

func (*Runner) AddSection

func (runner *Runner) AddSection(section *Section)

func (*Runner) Interrupt

func (runner *Runner) Interrupt()

func (*Runner) Results

func (runner *Runner) Results() []*SectionSummary

func (*Runner) Start

func (runner *Runner) Start()

func (*Runner) Wait

func (runner *Runner) Wait() error

type RunnerOption

type RunnerOption func(*Runner)

func SetStatusChannel

func SetStatusChannel(statusCh chan<- CheckSummary) RunnerOption

type Section

type Section struct {
	Heading  string
	Checkers []Checker
}

type SectionSummary

type SectionSummary struct {
	Heading string
	Checks  []*CheckSummary
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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