package
Version:
v0.0.0-...-c162711
Opens a new window with list of versions in this module.
Published: Oct 30, 2024
License: MIT
Opens a new window with license information.
Imports: 32
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Serve initializes and starts the HTTP server.
Handles graceful shutdown when receiving termination signals.
type APIResponse struct {
Message string `json:"message"`
Version string `json:"version"`
APIVersion string `json:"api_version"`
Timestamp string `json:"timestamp"`
AvailableEndpoints []Endpoint `json:"available_endpoints"`
CreatedBy string `json:"created_by"`
License string `json:"license"`
}
type Dependency struct {
Status string `json:"status" example:"up"`
ResponseTime string `json:"response_time,omitempty" example:"48ms"`
}
type Endpoint struct {
Path string `json:"path"`
Description string `json:"description"`
}
type HealthcheckResponse struct {
Status string `json:"status" example:"operational"`
SystemInfo SystemInfo `json:"systemInfo"`
Dependencies map[string]Dependency `json:"dependencies"`
}
type SystemInfo struct {
Environment string `json:"environment" example:"prod"`
Uptime string `json:"uptime" example:"3h 26m 30s"`
LastChecked string `json:"last_checked" example:"2024-09-24T00:41:20+05:00"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.