// FindServerByIP returns a server by advertise IP
FindServerByIP returns a server by advertise IP
// FindServerByIP returns a server by advertise IP
func (s *ClusterState) FindServerByIP(ip string) (*Server, error) {
	for _, server := range s.Servers {
		if server.AdvertiseIP == ip {
			return &server, nil
		}
	}
	return nil, trace.NotFound("couldn't find server %q in cluster state: %v", ip, s)
}
func ( s * ClusterState ) FindServerByIP ( ip string ) ( * Server , error ) { for _ , server := range s . Servers { if server . AdvertiseIP == ip { return & server , nil } } return nil , trace . NotFound ( " " , ip , s ) }
FindServerByIP returns a server by advertise IP
FindServerByIP returns a server by advertise IP