Optimization: refactor picker

This commit is contained in:
Dreamacro
2019-07-02 19:18:03 +08:00
parent 0eff8516c0
commit 7c6c147a18
9 changed files with 123 additions and 104 deletions

View File

@ -1,6 +1,7 @@
package constant
import (
"context"
"net"
"time"
)
@ -44,7 +45,7 @@ type Proxy interface {
Alive() bool
DelayHistory() []DelayHistory
LastDelay() uint16
URLTest(url string) (uint16, error)
URLTest(ctx context.Context, url string) (uint16, error)
}
// AdapterType is enum of adapter type