stats

package
v0.0.0-...-b474970 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stats

type Stats struct {
	sync.Mutex
	// InQueue is number of links waiting in the queue to be checked.
	InQueue int
	// NOK is number of links that were checked and are OK.
	NOK int
	// NFailed is number of links that have some issue of severity warn or error.
	NFailed int
}

Stats handles linting statistics during the run. It can be used to periodically inform the user on progress of the linting.

func New

func New() *Stats

func (*Stats) Failed

func (s *Stats) Failed()

Failed finishes link statistic by marking the link with fail status.

func (*Stats) OK

func (s *Stats) OK()

OK finishes link statistic by marking the link with ok status.

func (*Stats) Queue

func (s *Stats) Queue(n int)

Queue adds `n` links into the processing queue.

func (*Stats) String

func (s *Stats) String() string

String returns string representation of the stats.

Jump to

Keyboard shortcuts

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