ping

package
v0.14.1 Latest Latest
Warning

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

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

Documentation

Overview

Package ping provides utilities to ping a remote host

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node string

Node is an interactive node

func NewNode

func NewNode(s string) Node

NewNode returns a Node object when given a string

func (Node) PingNode

func (n Node) PingNode(ctx context.Context, extraPingOpts []string) error

PingNode pings a node (described by a Node object) with a 5-second timeout. It returns an error

func (Node) String

func (n Node) String() string

String converts a Node object into a string

type PingNodeStatus

type PingNodeStatus struct {
	PingNoder
	Err error
}

PingNodeStatus stores information about an attempt to ping a Node. If there was an error, it's stored in Err.

type PingNoder

type PingNoder interface {
	PingNode(context.Context, []string) error
	String() string
}

PingNoder is an interface that wraps the PingNode method. It is meant to be used where pinging a node is necessary. PingNoders also implement the Stringer interface.

Jump to

Keyboard shortcuts

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