Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status"`
Version string `json:"version"`
Uptime string `json:"uptime"`
ScaleSets []ScaleSetStatus `json:"scale_sets"`
}
HealthResponse is the JSON response for /healthz.
type HealthServer ¶
type HealthServer struct {
// contains filtered or unexported fields
}
HealthServer provides /healthz and /readyz endpoints for monitoring.
func NewHealthServer ¶
func NewHealthServer(port int, version string) *HealthServer
NewHealthServer creates a new health check HTTP server.
func (*HealthServer) RegisterScaler ¶
func (h *HealthServer) RegisterScaler(name string, s RunnerCounter)
RegisterScaler adds a scaler to be reported in health checks.
func (*HealthServer) Serve ¶
func (h *HealthServer) Serve(ln net.Listener) error
Serve starts the HTTP server on the given listener.
func (*HealthServer) Shutdown ¶
func (h *HealthServer) Shutdown(ctx context.Context) error
Shutdown gracefully shuts down the health server.
func (*HealthServer) UnregisterScaler ¶
func (h *HealthServer) UnregisterScaler(name string)
UnregisterScaler removes a scaler from health reporting.
type RunnerCounter ¶
type RunnerCounter interface {
RunnerCounts() (idle, busy int)
}
RunnerCounter provides runner count information.
type ScaleSetStatus ¶
type ScaleSetStatus struct {
Name string `json:"name"`
Idle int `json:"idle"`
Busy int `json:"busy"`
}
ScaleSetStatus represents the status of a single scale set.
Click to show internal directories.
Click to hide internal directories.