Versions in this module Expand all Collapse all v1 v1.0.3 Aug 12, 2024 v1.0.2 Jun 21, 2024 v1.0.1 Jun 21, 2024 Changes in this version + var ErrDFNotSupported = errors.New("setting do-not-fragment bit is not supported on this platform") + var ErrMarkNotSupported = errors.New("setting SO_MARK socket option is not supported on this platform") + type HTTPCallInfo struct + IsValidResponse bool + StatusCode int + type HTTPCaller struct + func NewHttpCaller(url string, options ...HTTPCallerOption) *HTTPCaller + func (c *HTTPCaller) Run() + func (c *HTTPCaller) RunWithContext(ctx context.Context) + func (c *HTTPCaller) Stop() + type HTTPCallerOption func(options *httpCallerOptions) + func WithHTTPCallerBody(body []byte) HTTPCallerOption + func WithHTTPCallerCallFrequency(frequency time.Duration) HTTPCallerOption + func WithHTTPCallerClient(client *http.Client) HTTPCallerOption + func WithHTTPCallerHeaders(headers http.Header) HTTPCallerOption + func WithHTTPCallerHost(host string) HTTPCallerOption + func WithHTTPCallerIsValidResponse(isValid func(response *http.Response, body []byte) bool) HTTPCallerOption + func WithHTTPCallerLogger(logger Logger) HTTPCallerOption + func WithHTTPCallerMaxConcurrentCalls(max int) HTTPCallerOption + func WithHTTPCallerMethod(method string) HTTPCallerOption + func WithHTTPCallerOnConnDone(conConnDone func(suite *TraceSuite, network, addr string, err error)) HTTPCallerOption + func WithHTTPCallerOnConnStart(onConnStart func(suite *TraceSuite, network, addr string)) HTTPCallerOption + func WithHTTPCallerOnDNSDone(onDNSDone func(suite *TraceSuite, info httptrace.DNSDoneInfo)) HTTPCallerOption + func WithHTTPCallerOnDNSStart(onDNSStart func(suite *TraceSuite, info httptrace.DNSStartInfo)) HTTPCallerOption + func WithHTTPCallerOnFirstByteReceived(onGotFirstByte func(suite *TraceSuite)) HTTPCallerOption + func WithHTTPCallerOnReq(onReq func(suite *TraceSuite)) HTTPCallerOption + func WithHTTPCallerOnResp(onResp func(suite *TraceSuite, info *HTTPCallInfo)) HTTPCallerOption + func WithHTTPCallerOnTLSDone(onTLSDone func(suite *TraceSuite, state tls.ConnectionState, err error)) HTTPCallerOption + func WithHTTPCallerOnTLSStart(onTLSStart func(suite *TraceSuite)) HTTPCallerOption + func WithHTTPCallerOnWroteRequest(onWroteRequest func(suite *TraceSuite)) HTTPCallerOption + func WithHTTPCallerTimeout(timeout time.Duration) HTTPCallerOption + type Logger interface + Debugf func(format string, v ...interface{}) + Errorf func(format string, v ...interface{}) + Fatalf func(format string, v ...interface{}) + Infof func(format string, v ...interface{}) + Warnf func(format string, v ...interface{}) + type NoopLogger struct + func (l NoopLogger) Debugf(format string, v ...interface{}) + func (l NoopLogger) Errorf(format string, v ...interface{}) + func (l NoopLogger) Fatalf(format string, v ...interface{}) + func (l NoopLogger) Infof(format string, v ...interface{}) + func (l NoopLogger) Warnf(format string, v ...interface{}) + type Packet struct + Addr string + ID int + IPAddr *net.IPAddr + Nbytes int + Rtt time.Duration + Seq int + TTL int + type Pinger struct + Count int + Debug bool + Interval time.Duration + OnDuplicateRecv func(*Packet) + OnFinish func(*Statistics) + OnRecv func(*Packet) + OnRecvError func(error) + OnSend func(*Packet) + OnSendError func(*Packet, error) + OnSetup func() + PacketsRecv int + PacketsRecvDuplicates int + PacketsSent int + RecordRtts bool + ResolveTimeout time.Duration + Size int + Source string + TTL int + Timeout time.Duration + Tracker uint64 + func New(addr string) *Pinger + func NewPinger(addr string) (*Pinger, error) + func (p *Pinger) Addr() string + func (p *Pinger) ID() int + func (p *Pinger) IPAddr() *net.IPAddr + func (p *Pinger) Mark() uint + func (p *Pinger) Privileged() bool + func (p *Pinger) Resolve() error + func (p *Pinger) Run() error + func (p *Pinger) RunWithContext(ctx context.Context) error + func (p *Pinger) SetAddr(addr string) error + func (p *Pinger) SetDoNotFragment(df bool) + func (p *Pinger) SetID(id int) + func (p *Pinger) SetIPAddr(ipaddr *net.IPAddr) + func (p *Pinger) SetLogger(logger Logger) + func (p *Pinger) SetMark(m uint) + func (p *Pinger) SetNetwork(n string) + func (p *Pinger) SetPrivileged(privileged bool) + func (p *Pinger) Statistics() *Statistics + func (p *Pinger) Stop() + type Statistics struct + Addr string + AvgRtt time.Duration + IPAddr *net.IPAddr + MaxRtt time.Duration + MinRtt time.Duration + PacketLoss float64 + PacketsRecv int + PacketsRecvDuplicates int + PacketsSent int + Rtts []time.Duration + StdDevRtt time.Duration + type StdLogger struct + Logger *log.Logger + func (l StdLogger) Debugf(format string, v ...interface{}) + func (l StdLogger) Errorf(format string, v ...interface{}) + func (l StdLogger) Fatalf(format string, v ...interface{}) + func (l StdLogger) Infof(format string, v ...interface{}) + func (l StdLogger) Warnf(format string, v ...interface{}) + type TraceSuite struct + Extra any + func (s *TraceSuite) GetConnEnd() time.Time + func (s *TraceSuite) GetConnStart() time.Time + func (s *TraceSuite) GetDNSEnd() time.Time + func (s *TraceSuite) GetDNSStart() time.Time + func (s *TraceSuite) GetFirstByteReceived() time.Time + func (s *TraceSuite) GetGeneralEnd() time.Time + func (s *TraceSuite) GetGeneralStart() time.Time + func (s *TraceSuite) GetTLSEnd() time.Time + func (s *TraceSuite) GetTLSStart() time.Time + func (s *TraceSuite) GetWroteHeaders() time.Time