ping

package
v0.0.0-...-70d54de Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PingMany

func PingMany(request string, timeout int64, count int64) (string, error)

Types

type Manager

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

func NewManager

func NewManager(worker int64, timeout int64, count int64) *Manager

func (*Manager) AddRequest

func (m *Manager) AddRequest(ip string, nodeID int64, proto int64)

func (*Manager) Loop

func (m *Manager) Loop()

func (*Manager) SetCount

func (m *Manager) SetCount(count int64)

func (*Manager) SetTimeout

func (m *Manager) SetTimeout(timeout int64)

func (*Manager) WaitResult

func (m *Manager) WaitResult() (*PingResponse, error)

type PingRequest

type PingRequest struct {
	Url    string
	NodeID int64
	Proto  int64
}

type PingResponse

type PingResponse struct {
	NodeID int64
	Url    string
	Ping   int64
	Score  float64
}

type Result

type Result struct {
	Ping  int64
	Score float64
}

func Ping

func Ping(url string, proto int64, timeout int64, count int64) *Result

Jump to

Keyboard shortcuts

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