mirror of
https://github.com/status-im/consul.git
synced 2025-02-08 11:54:12 +00:00
Export the consul service id and name
This commit is contained in:
parent
9d34893992
commit
4ee8bde861
@ -11,6 +11,8 @@ import (
|
|||||||
const (
|
const (
|
||||||
SerfCheckID = "serfHealth"
|
SerfCheckID = "serfHealth"
|
||||||
SerfCheckName = "Serf Health Status"
|
SerfCheckName = "Serf Health Status"
|
||||||
|
ConsulServiceID = "consul"
|
||||||
|
ConsulServiceName = "consul"
|
||||||
)
|
)
|
||||||
|
|
||||||
// monitorLeadership is used to monitor if we acquire or lose our role
|
// monitorLeadership is used to monitor if we acquire or lose our role
|
||||||
@ -142,8 +144,8 @@ func (s *Server) handleAliveMember(member serf.Member) error {
|
|||||||
var service *structs.NodeService
|
var service *structs.NodeService
|
||||||
if valid, _, port := isConsulServer(member); valid {
|
if valid, _, port := isConsulServer(member); valid {
|
||||||
service = &structs.NodeService{
|
service = &structs.NodeService{
|
||||||
ID: "consul",
|
ID: ConsulServiceID,
|
||||||
Service: "consul",
|
Service: ConsulServiceName,
|
||||||
Port: port,
|
Port: port,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user