mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-18 06:29:42 +02:00
refactor(entrypoint): move route registry into entrypoint context (#200)
- Introduced `NewTestRoute` function to simplify route creation in benchmark tests. - Replaced direct route validation and starting with error handling using `require.NoError`. - Updated server retrieval to use `common.ProxyHTTPAddr` for consistency. - Improved logging for HTTP route addition errors in `AddRoute` method. * fix(tcp): wrap proxy proto listener before acl * refactor(entrypoint): propagate errors from route registration and stream serving * fix(docs): correct swagger and package README
This commit is contained in:
@@ -74,6 +74,19 @@ type (
|
||||
Config *LoadBalancerConfig `json:"config"`
|
||||
Pool map[string]any `json:"pool"`
|
||||
} // @name HealthExtra
|
||||
|
||||
HealthInfoWithoutDetail struct {
|
||||
Status HealthStatus `json:"status" swaggertype:"string" enums:"healthy,unhealthy,napping,starting,error,unknown"`
|
||||
Uptime time.Duration `json:"uptime" swaggertype:"number"` // uptime in milliseconds
|
||||
Latency time.Duration `json:"latency" swaggertype:"number"` // latency in microseconds
|
||||
} // @name HealthInfoWithoutDetail
|
||||
|
||||
HealthInfo struct {
|
||||
HealthInfoWithoutDetail
|
||||
Detail string `json:"detail"`
|
||||
} // @name HealthInfo
|
||||
|
||||
HealthMap = map[string]HealthStatusString // @name HealthMap
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -20,6 +20,7 @@ type (
|
||||
pool.Object
|
||||
ProviderName() string
|
||||
GetProvider() RouteProvider
|
||||
ListenURL() *nettypes.URL
|
||||
TargetURL() *nettypes.URL
|
||||
HealthMonitor() HealthMonitor
|
||||
SetHealthMonitor(m HealthMonitor)
|
||||
|
||||
Reference in New Issue
Block a user