reachable

package
v2.1.24 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// DefaultPort is the default tcp port.
	DefaultPort = "80"
	// DefaultNetwork is the default network type.
	DefaultNetwork = "tcp"
	// DefaultTimeout is the default dial timeout.
	DefaultTimeout = 1 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address string
	Network string
	Timeout time.Duration
}

type Reachable

type Reachable interface {
	// Check that the address can be accessed.
	Check() error
}

func New

func New(r *Config) Reachable

New returns a new ReachableInterface interface.

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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