21 lines
312 B
Go
21 lines
312 B
Go
package registry
|
|
|
|
type consulService struct {
|
|
ServiceName string
|
|
ServiceNodes []*consulNode
|
|
}
|
|
|
|
func (c *consulService) Name() string {
|
|
return c.ServiceName
|
|
}
|
|
|
|
func (c *consulService) Nodes() []Node {
|
|
var nodes []Node
|
|
|
|
for _, node := range c.ServiceNodes {
|
|
nodes = append(nodes, node)
|
|
}
|
|
|
|
return nodes
|
|
}
|