icmp

package
v1.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config Config) func(ctx context.Context) error

New creates new ICMP service health check that verifies the following: - domain name record can be resolved (if hostname is provided instead of the IP address) - ICMP echo request is sent and response is received

Types

type Config

type Config struct {
	// Address is the IP address or hostname that is being checked.
	Address string
	// Count is the number of ICMP packets to send to the Address
	// Default is 1 packet.
	Count int
	// Interval is the wait time between each packet send.
	// Default is the value from probing.Pinger struct (1 second).
	Interval time.Duration
	// RequestTimeout is the duration that health check will try to consume published test message.
	// Default is the value from probing.Pinger struct (5 seconds).
	RequestTimeout time.Duration
}

Config is the ICMP checker configuration settings container.

Jump to

Keyboard shortcuts

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