2017-08-14 14:36:07 +00:00
|
|
|
// +build !ent
|
|
|
|
|
|
|
|
package command
|
|
|
|
|
|
|
|
import (
|
|
|
|
consulapi "github.com/hashicorp/consul/api"
|
2017-09-01 00:39:46 +00:00
|
|
|
"fmt"
|
2017-08-14 14:36:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// getSegmentMembers returns an empty list since network segments are not
|
|
|
|
// supported in OSS Consul.
|
|
|
|
func getSegmentMembers(client *consulapi.Client) ([]*consulapi.AgentMember, error) {
|
2017-09-01 00:39:46 +00:00
|
|
|
members, err := client.Agent().MembersOpts(consulapi.MembersOpts{})
|
|
|
|
if err != nil {
|
|
|
|
return nil, fmt.Errorf("Error retrieving members: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
return members, nil
|
2017-08-14 14:36:07 +00:00
|
|
|
}
|