connectivity

package
v5.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInterval  = errors.New("connectivity.checker.interval must be 5s or higher")
	ErrInvalidDNSTarget = errors.New("connectivity.checker.target must be suffixed with :53")
)

Functions

This section is empty.

Types

type Checker

type Checker struct {
	Target   string        `yaml:"target"` // e.g. 1.1.1.1:53
	Interval time.Duration `yaml:"interval,omitempty"`
	// contains filtered or unexported fields
}

Checker is the configuration for making sure Gatus has access to the internet.

func (*Checker) Check

func (c *Checker) Check() bool

func (*Checker) IsConnected

func (c *Checker) IsConnected() bool

type Config

type Config struct {
	Checker *Checker `yaml:"checker,omitempty"`
}

Config is the configuration for the connectivity checker.

func (*Config) ValidateAndSetDefaults

func (c *Config) ValidateAndSetDefaults() error

Jump to

Keyboard shortcuts

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