// IsServiceReachableFromExternal check if service is reachable from external
IsServiceReachableFromExternal check if service is reachable from external
// IsServiceReachableFromExternal check if service is reachable from external
func IsServiceReachableFromExternal(service service.Service, sd ServiceDiscovery) bool {
	if !service.UseGroupAttributes || service.GroupId == "" {
		return service.IsReachable
	}
	serviceGroupService, err := servicegroup.NewServiceGroupServiceWithUser(userModels.GetInternalAPIUser())
	if err != nil {
		return false
	}
	sgList, err := serviceGroupService.GetServiceGroups()
	if err != nil {
		return false
	}
	for _, sg := range sgList {
		if sg.Contains(service.Id) {
			return sg.IsReachable
		}
	}
	return false
}
func IsServiceReachableFromExternal ( service service . Service , sd ServiceDiscovery ) bool { if ! service . UseGroupAttributes || service . GroupId == " " { return service . IsReachable } serviceGroupService , err := servicegroup . NewServiceGroupServiceWithUser ( userModels . GetInternalAPIUser ( ) ) if err != nil { return false } sgList , err := serviceGroupService . GetServiceGroups ( ) if err != nil { return false } for _ , sg := range sgList { if sg . Contains ( service . Id ) { return sg . IsReachable } } return false }
IsServiceReachableFromExternal check if service is reachable from external
IsServiceReachableFromExternal check if service is reachable from external