Feature: add meanDelay on URLTest
This commit is contained in:
@ -101,8 +101,9 @@ type ProxyAdapter interface {
|
||||
}
|
||||
|
||||
type DelayHistory struct {
|
||||
Time time.Time `json:"time"`
|
||||
Delay uint16 `json:"delay"`
|
||||
Time time.Time `json:"time"`
|
||||
Delay uint16 `json:"delay"`
|
||||
MeanDelay uint16 `json:"meanDelay"`
|
||||
}
|
||||
|
||||
type Proxy interface {
|
||||
@ -110,7 +111,7 @@ type Proxy interface {
|
||||
Alive() bool
|
||||
DelayHistory() []DelayHistory
|
||||
LastDelay() uint16
|
||||
URLTest(ctx context.Context, url string) (uint16, error)
|
||||
URLTest(ctx context.Context, url string) (uint16, uint16, error)
|
||||
|
||||
// Deprecated: use DialContext instead.
|
||||
Dial(metadata *Metadata) (Conn, error)
|
||||
|
Reference in New Issue
Block a user