func (sd *serviceDiscovery) GetService(hostname string) (*model.Service, error) {
	apps, err := sd.client.Applications()
	if err != nil {
		glog.Warningf("could not list Eureka instances: %v", err)
		return nil, err
	}
	services := convertServices(apps, map[string]bool{hostname: true})
	service := services[hostname]
	return service, nil
}
GetService implements a service catalog operation
package eureka
import (
	"github.com/golang/glog"
	"istio.io/pilot/model"
)
func NewServiceDiscovery(client Client) model.ServiceDiscovery {
	return &serviceDiscovery{
		client: client,
	}
}
type serviceDiscovery struct {
	client Client
}
func (sd *serviceDiscovery) Services() ([]*model.Service, error) {
	apps, err := sd.client.Applications()
	if err != nil {
		glog.Warningf("could not list Eureka instances: %v", err)
		return nil, err
	}
	services := convertServices(apps, nil)
	out := make([]*model.Service, 0, len(services))
	for _, service := range services {
		out = append(out, service)
	}
	return out, nil
}