feat(healthcheck): allow health checking for excluded routes

This commit is contained in:
yusing
2025-06-02 23:19:30 +08:00
parent 4705989f4b
commit 9087c4f195
9 changed files with 138 additions and 57 deletions

View File

@@ -96,8 +96,16 @@ func (s *FileServer) Start(parent task.Parent) gperr.Error {
}
}
if s.ShouldExclude() {
return nil
}
if err := checkExists(s); err != nil {
return err
}
routes.HTTP.Add(s)
s.task.OnCancel("entrypoint_remove_route", func() {
s.task.OnFinished("remove_route_from_http", func() {
routes.HTTP.Del(s)
})
return nil