Skip to content

Commit

Permalink
调整健康检查的显示内容
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Sep 25, 2023
1 parent f3e48d7 commit aeb68e0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions healthCheck.go
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
}

0 comments on commit aeb68e0

Please sign in to comment.