-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Labels
Description
when registrar get instances from eureka server app, it ignore eureka app status.
func convertFargoAppToInstances(app *fargo.Application) []string {
instances := make([]string, len(app.Instances))
for i, inst := range app.Instances {
instances[i] = fmt.Sprintf("%s:%d", inst.IPAddr, inst.Port)
}
return instances
}How can i filter them? (eg: I only want STATUS = 'UP' instance)
func convertFargoAppToInstances(app *fargo.Application) []string {
var instances []string
for _, inst := range app.Instances {
if inst.Status == fargo.UP {
instances = append(instances, fmt.Sprintf("%s:%d", inst.IPAddr, inst.Port))
}
}
return instances
}whiteboy19787bmwhiteboy19787bm