feat: enhance proxy management

This commit is contained in:
LLLLLLiulei
2026-01-14 19:45:29 +08:00
parent b3b2868f55
commit 9bdb45be7c
21 changed files with 853 additions and 90 deletions

View File

@@ -0,0 +1,18 @@
package service
import (
"context"
"time"
)
type ProxyLatencyInfo struct {
Success bool `json:"success"`
LatencyMs *int64 `json:"latency_ms,omitempty"`
Message string `json:"message,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
type ProxyLatencyCache interface {
GetProxyLatencies(ctx context.Context, proxyIDs []int64) (map[int64]*ProxyLatencyInfo, error)
SetProxyLatency(ctx context.Context, proxyID int64, info *ProxyLatencyInfo) error
}