runtime

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checks

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

Checks holds all the checks.

func (*Checks) Add

func (c *Checks) Add(check checks.Check)

Add adds a new check.

func (*Checks) Delete

func (c *Checks) Delete(check checks.Check)

Delete deletes a check.

func (*Checks) Iter

func (c *Checks) Iter() []checks.Check

Iter returns configured checks in an iterable format

type Config

type Config struct {
	Health     *health.Config     `yaml:"health" json:"health"`
	Latency    *latency.Config    `yaml:"latency" json:"latency"`
	Dns        *dns.Config        `yaml:"dns" json:"dns"`
	Traceroute *traceroute.Config `yaml:"traceroute" json:"traceroute"`
}

Config holds the runtime configuration for the various checks the sparrow supports

func (Config) Empty

func (c Config) Empty() bool

Empty returns true if no checks are configured

func (Config) For

func (c Config) For(name string) checks.Runtime

For returns the runtime configuration for the check with the given name

func (Config) HasCheck

func (c Config) HasCheck(name string) bool

HasCheck returns true if the check has a check with the given name configured

func (Config) HasDNSCheck

func (c Config) HasDNSCheck() bool

HasDNSCheck returns true if the check has a dns check configured

func (Config) HasHealthCheck

func (c Config) HasHealthCheck() bool

HasHealthCheck returns true if the check has a health check configured

func (Config) HasLatencyCheck

func (c Config) HasLatencyCheck() bool

HasLatencyCheck returns true if the check has a latency check configured

func (Config) HasTracerouteCheck added in v0.3.2

func (c Config) HasTracerouteCheck() bool

HasTracerouteCheck returns true if the check has a traceroute check configured

func (Config) Iter

func (c Config) Iter() []checks.Runtime

Iter returns configured checks in an iterable format

func (Config) Validate

func (c Config) Validate() (err error)

Jump to

Keyboard shortcuts

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