ping

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const SurviveListFilePath = "server-list.txt"

Variables

This section is empty.

Functions

func ParsePingItems

func ParsePingItems(b []byte, logger *logrus.Logger) (strings2.IPS, error)

ParsePingItems 解析探活地址区间

func Run

Run 执行指令

Types

type Config

type Config struct {
	Ping []struct {
		Address string `yaml:"address"`
		Start   int    `yaml:"start"`
		End     int    `yaml:"end"`
		Port    int    `yaml:"port"`
	} `yaml:"ping"`
}

type Handler

type Handler struct{}

func (Handler) ICMP

func (h Handler) ICMP(ip string, count int, timeout time.Duration, privileged bool) error

func (Handler) Telnet

func (h Handler) Telnet(protocol string, address string, timeout time.Duration) error

type HandlerInterface

type HandlerInterface interface {
	ICMP(ip string, count int, timeout time.Duration, privileged bool) error
	Telnet(protocol string, address string, timeout time.Duration) error
}

type Manger

type Manger struct {
	Handler      HandlerInterface
	CheckCount   int
	CheckTimeout time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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