mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 14:24:39 +00:00
3e4a522882
Treat each exported service as a "discovery chain" and replicate one synthetic CheckServiceNode for each chain and remote mesh gateway. The health will be a flattened generated check of the checks for that mesh gateway node.
13 lines
192 B
Go
13 lines
192 B
Go
package maps
|
|
|
|
func SliceOfKeys[K comparable, V any](m map[K]V) []K {
|
|
if len(m) == 0 {
|
|
return nil
|
|
}
|
|
res := make([]K, 0, len(m))
|
|
for k := range m {
|
|
res = append(res, k)
|
|
}
|
|
return res
|
|
}
|