mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-05 21:47:31 +00:00
healthcheck latency of the provider is also stored in the extra, without compromising rest api compatibility
This commit is contained in:
@@ -147,15 +147,19 @@ type DelayHistory struct {
|
||||
Delay uint16 `json:"delay"`
|
||||
}
|
||||
|
||||
type ProxyState struct {
|
||||
Alive bool `json:"alive"`
|
||||
History []DelayHistory `json:"history"`
|
||||
}
|
||||
|
||||
type DelayHistoryStoreType int
|
||||
|
||||
type Proxy interface {
|
||||
ProxyAdapter
|
||||
AliveForTestUrl(url string) bool
|
||||
Alive(url string) bool
|
||||
DelayHistory() []DelayHistory
|
||||
ExtraDelayHistory() map[string][]DelayHistory
|
||||
ExtraDelayHistories() map[string]ProxyState
|
||||
LastDelayForTestUrl(url string) uint16
|
||||
OriginalHealthCheckUrl(url string)
|
||||
URLTest(ctx context.Context, url string, expectedStatus utils.IntRanges[uint16]) (uint16, error)
|
||||
|
||||
// Deprecated: use DialContext instead.
|
||||
|
||||
Reference in New Issue
Block a user