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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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