Documentation ¶
Overview ¶
Package implement provides simple wrapper of anping.AnPinger
Index ¶
- Constants
- func New(logWriter io.Writer) anping.AnPinger
- type AnPingerWrapper
- func (a *AnPingerWrapper) Address() M.Socksaddr
- func (a *AnPingerWrapper) OnFinish()
- func (a *AnPingerWrapper) OnLost(errMsg ...any)
- func (a *AnPingerWrapper) OnRecv(t time.Duration)
- func (a *AnPingerWrapper) OnStart()
- func (a *AnPingerWrapper) Options() *anping.Options
- func (a *AnPingerWrapper) Protocol() string
- func (a *AnPingerWrapper) ResetStatistics()
- func (a *AnPingerWrapper) SetAddress(address M.Socksaddr) error
- func (a *AnPingerWrapper) SetLogger(logger statistics.Logger)
- func (a *AnPingerWrapper) Start(ctx context.Context) <-chan struct{}
- func (a *AnPingerWrapper) Statistics() statistics.StatisticsGetter
Constants ¶
View Source
const Protocol = "Unknown"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnPingerWrapper ¶
type AnPingerWrapper struct { Opt *anping.Options Sta *statistics.Statistics // contains filtered or unexported fields }
AnPingerWrapper is a simple wrapper of anping.AnPinger. It does nothing when running.
func (*AnPingerWrapper) Address ¶ added in v0.3.0
func (a *AnPingerWrapper) Address() M.Socksaddr
func (*AnPingerWrapper) OnFinish ¶
func (a *AnPingerWrapper) OnFinish()
func (*AnPingerWrapper) OnLost ¶
func (a *AnPingerWrapper) OnLost(errMsg ...any)
func (*AnPingerWrapper) OnRecv ¶
func (a *AnPingerWrapper) OnRecv(t time.Duration)
func (*AnPingerWrapper) OnStart ¶
func (a *AnPingerWrapper) OnStart()
func (*AnPingerWrapper) Options ¶
func (a *AnPingerWrapper) Options() *anping.Options
func (*AnPingerWrapper) Protocol ¶
func (a *AnPingerWrapper) Protocol() string
func (*AnPingerWrapper) ResetStatistics ¶ added in v0.3.0
func (a *AnPingerWrapper) ResetStatistics()
func (*AnPingerWrapper) SetAddress ¶
func (a *AnPingerWrapper) SetAddress(address M.Socksaddr) error
func (*AnPingerWrapper) SetLogger ¶
func (a *AnPingerWrapper) SetLogger(logger statistics.Logger)
func (*AnPingerWrapper) Start ¶ added in v0.3.0
func (a *AnPingerWrapper) Start(ctx context.Context) <-chan struct{}
func (*AnPingerWrapper) Statistics ¶ added in v0.3.0
func (a *AnPingerWrapper) Statistics() statistics.StatisticsGetter
Click to show internal directories.
Click to hide internal directories.