feat(platform): expose vehicle service runtime health

This commit is contained in:
lingniu
2026-07-04 01:02:07 +08:00
parent 377cfcdfca
commit 3e76210d7d
6 changed files with 53 additions and 6 deletions

View File

@@ -37,7 +37,9 @@ func NewServer(cfg config.Config) http.Handler {
log.Printf("production mysql store enabled")
}
}
api := platform.NewHandler(platform.NewService(store))
api := platform.NewHandler(platform.NewServiceWithRuntime(store, platform.RuntimeInfo{
RequestTimeoutMs: int(cfg.RequestTimeout / time.Millisecond),
}))
return withRequestTimeout(static.Handler(cfg.StaticDir, api), cfg.RequestTimeout)
}