check

package
v0.0.0-...-a280d7a Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCheck

func RunCheck(collector Collector, host, port string, opts ...Option) error

RunCheck executes checks and collects facts for provided host and port.

Types

type CollectedInfo

type CollectedInfo struct {
	Name     string
	Value    string
	Duration time.Duration
}

CollectedInfo is key-value information used to represent facts collected from an endpoint check execution.

type Collector

type Collector chan CollectedInfo

Collector is a channel that collected information is published to.

type Option

type Option func(*Options)

func CollectTiming

func CollectTiming() Option

CollectTiming directs the check execution to collecting timing facts.

func UseNameserver

func UseNameserver(nameserver string) Option

UseNameserver directs the check execution to use a specific nameserver to resolve the target/host.

func WithContext

func WithContext(ctx context.Context) Option

WithContext sets the context used with a check execution.

type Options

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

Jump to

Keyboard shortcuts

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