From b76ea0e35f314f31c868fddb971d92f563301cbc Mon Sep 17 00:00:00 2001 From: Sabbir Date: Wed, 11 Sep 2024 16:08:37 +0600 Subject: [PATCH] Update client.go Signed-off-by: Sabbir --- cassandra/client.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cassandra/client.go b/cassandra/client.go index 8a1d349c..9c05a6e0 100644 --- a/cassandra/client.go +++ b/cassandra/client.go @@ -2,6 +2,7 @@ package cassandra import ( "fmt" + health "kmodules.xyz/client-go/tools/healthchecker" "log" "github.com/gocql/gocql" @@ -79,3 +80,10 @@ func (c *Client) PingCassandra() error { } return nil } + +func (c *Client) closeCassandraClient(hcf *health.HealthCard) { + if c != nil { + c.Close() + } + hcf.ClientClosed() +}