From b7b42e832ad711ebb5af5c03e1c8e8a471c6bde0 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:05:14 +0100 Subject: [feature] Add healthcheck endpoints `/livez` and `/readyz` (#2783) * [feature] Add healthcheck endpoints `/livez` and `/readyz` * use select that returns no data --- internal/db/basic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/db/basic.go') diff --git a/internal/db/basic.go b/internal/db/basic.go index 3a8e2af8d..4c27b7ea6 100644 --- a/internal/db/basic.go +++ b/internal/db/basic.go @@ -33,8 +33,8 @@ type Basic interface { // If the database implementation doesn't need to be stopped, this can just return nil. Close() error - // IsHealthy should return nil if the database connection is healthy, or an error if not. - IsHealthy(ctx context.Context) error + // Ready returns nil if the database connection is ready, or an error if not. + Ready(ctx context.Context) error // GetByID gets one entry by its id. In a database like postgres, this might be the 'id' field of the entry, // for other implementations (for example, in-memory) it might just be the key of a map. -- cgit v1.2.3