micro/registry/kubernetes_service.go

21 lines
328 B
Go
Raw Normal View History

2015-01-14 02:31:27 +03:00
package registry
type KubernetesService struct {
ServiceName string
ServiceNodes []*KubernetesNode
}
func (c *KubernetesService) Name() string {
return c.ServiceName
}
func (c *KubernetesService) Nodes() []Node {
var nodes []Node
for _, node := range c.ServiceNodes {
nodes = append(nodes, node)
}
return nodes
}