code: func (d *raftData) ServiceInstances(service string) []*discoverd.Instance {
  	a := make([]*discoverd.Instance, 0, len(d.Instances[service]))
  	for _, i := range d.Instances[service] {
  		a = append(a, i)
  	}
  
  	sort.Sort(instanceSlice(a))
  	return a
  }
docs: // ServiceInstances returns the instances of a service in sorted order.