Пример #1
0
        private List <Service> BuildServices(EndpointsV1 endpoint)
        {
            var services = new List <Service>();

            foreach (var subset in endpoint.Subsets)
            {
                services.AddRange(subset.Addresses.Select(address => new Service(endpoint.Metadata.Name,
                                                                                 new ServiceHostAndPort(address.Ip, subset.Ports.First().Port),
                                                                                 endpoint.Metadata.Uid, string.Empty, Enumerable.Empty <string>())));
            }
            return(services);
        }
 private void GivenTheServicesAreRegisteredWithKube(EndpointsV1 endpointEntries)
 {
     _endpointEntries = endpointEntries;
 }