2021-11-16 18:04:01 +00:00
|
|
|
//go:build !consulent
|
2021-08-17 21:49:26 +00:00
|
|
|
// +build !consulent
|
|
|
|
|
|
|
|
package state
|
|
|
|
|
2022-02-24 22:54:47 +00:00
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"github.com/hashicorp/consul/agent/structs"
|
|
|
|
)
|
2021-08-17 21:49:26 +00:00
|
|
|
|
|
|
|
func (nst nodeServiceTuple) nodeTuple() nodeTuple {
|
2022-02-24 22:54:47 +00:00
|
|
|
return nodeTuple{
|
|
|
|
Node: strings.ToLower(nst.Node),
|
|
|
|
Partition: "",
|
|
|
|
}
|
2021-08-17 21:49:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func newNodeTupleFromNode(node *structs.Node) nodeTuple {
|
|
|
|
return nodeTuple{
|
2022-02-24 22:54:47 +00:00
|
|
|
Node: strings.ToLower(node.Node),
|
2021-08-17 21:49:26 +00:00
|
|
|
Partition: "",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newNodeTupleFromHealthCheck(hc *structs.HealthCheck) nodeTuple {
|
|
|
|
return nodeTuple{
|
2022-02-24 22:54:47 +00:00
|
|
|
Node: strings.ToLower(hc.Node),
|
2021-08-17 21:49:26 +00:00
|
|
|
Partition: "",
|
|
|
|
}
|
|
|
|
}
|