api: enrich provider statistifcs

This commit is contained in:
yusing
2025-01-15 09:06:54 +08:00
parent 2af2346e35
commit 04e118c081
7 changed files with 97 additions and 32 deletions

View File

@@ -116,6 +116,14 @@ func (r *StreamRoute) Finish(reason any) {
r.task.Finish(reason)
}
func (r *StreamRoute) Health() health.Status {
if r.HealthMon != nil {
return r.HealthMon.Status()
}
return health.StatusUnknown
}
func (r *StreamRoute) acceptConnections() {
defer r.task.Finish("listener closed")