From aeb68e0ea1d70c9edc432b8222499f244b4472b2 Mon Sep 17 00:00:00 2001 From: steden <1470804@qq.com> Date: Mon, 25 Sep 2023 23:17:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=81=A5=E5=BA=B7=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E7=9A=84=E6=98=BE=E7=A4=BA=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- healthCheck.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/healthCheck.go b/healthCheck.go index 7259026..09d06cf 100644 --- a/healthCheck.go +++ b/healthCheck.go @@ -1,6 +1,9 @@ package rabbit -import amqp "github.com/rabbitmq/amqp091-go" +import ( + "fmt" + amqp "github.com/rabbitmq/amqp091-go" +) type healthCheck struct { server serverConfig @@ -12,5 +15,6 @@ func (c *healthCheck) Check() (string, error) { defer func(conn *amqp.Connection) { _ = conn.Close() }(manager.conn) - return "Rabbit." + c.server.Server, err + + return fmt.Sprintf("Rabbit.%s => Version %s", c.server.Server, manager.conn.Properties["version"]), err }