lxd/cluster/raft.go
func (i *raftInstance) Servers() ([]raft.Server, error) {
	if i.raft.State() != raft.Leader {
		return nil, raft.ErrNotLeader
	}
	future := i.raft.GetConfiguration()
	err := future.Error()
	if err != nil {
		return nil, err
	}
	configuration := future.Configuration()
	return configuration.Servers, nil
}
func (i *raftInstance) Servers() ([]raft.Server, error) {
	if i.raft.State() != raft.Leader {
		return nil, raft.ErrNotLeader
	}
	future := i.raft.GetConfiguration()
	err := future.Error()
	if err != nil {
		return nil, err
	}
	configuration := future.Configuration()
	return configuration.Servers, nil
}
func ( i * raftInstance ) Servers ( ) ( [ ] raft . Server , error ) { if i . raft . State ( ) != raft . Leader { return nil , raft . ErrNotLeader } future := i . raft . GetConfiguration ( ) err := future . Error ( ) if err != nil { return nil , err } configuration := future . Configuration ( ) return configuration . Servers , nil }
// Servers returns the servers that are currently part of the cluster.
//
// If this raft instance is not the leader, an error is returned.
Servers returns the servers that are currently part of the cluster . If this raft instance is not the leader an error is returned .