mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-30 15:58:46 +00:00
feat: Add liveness and readiness health check endpoints with database connectivity validation
- Add Ping method to PostgresProfileStore to check database connection status - Add Ping method to ProfileRepository interface - Add /api/v1/health/live endpoint for liveness checks (always returns alive if service is running) - Add /api/v1/health/ready endpoint for readiness checks with database connectivity validation - Add readinessHandler that returns SERVICE_UNAVAILABLE status when database ping fails
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"time"
|
||||
"context"
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
// ErrNotFound is returned when a profile lookup misses.
|
||||
@@ -39,4 +39,5 @@ type ProfileRepository interface {
|
||||
List(ctx context.Context, f ListFilter) ([]*Profile, int, error)
|
||||
UpdateState(ctx context.Context, iccid, state string) (*Profile, error)
|
||||
Delete(ctx context.Context, iccid string) error
|
||||
Ping() error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user