refactor: move types into a single file for each package

This commit is contained in:
2024-11-04 08:34:47 +01:00
parent b0443c34d7
commit 096290bcb8
9 changed files with 326 additions and 283 deletions

View File

@@ -23,22 +23,6 @@ import (
"net/url"
)
type HealthCheckRoute struct {
DisableRouteHealthCheckError bool
Routes []Route
}
// HealthCheckResponse represents the health check response structure
type HealthCheckResponse struct {
Status string `json:"status"`
Routes []HealthCheckRouteResponse `json:"routes"`
}
type HealthCheckRouteResponse struct {
Name string `json:"name"`
Status string `json:"status"`
Error string `json:"error"`
}
func HealthCheck(healthURL string) error {
healthCheckURL, err := url.Parse(healthURL)
if err != nil {