Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for GetByPort (0.57 sec)

  1. pilot/pkg/model/service_test.go

    	ports := PortList{{
    		Name: "http",
    		Port: 80,
    	}}
    
    	if port, exists := ports.GetByPort(80); !exists || port == nil || port.Name != "http" {
    		t.Errorf("GetByPort(80) => want http but got %v, %t", port, exists)
    	}
    	if port, exists := ports.GetByPort(88); exists || port != nil {
    		t.Errorf("GetByPort(88) => want none but got %v, %t", port, exists)
    	}
    }
    
    func BenchmarkParseSubsetKey(b *testing.B) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 20:38:02 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  2. pilot/pkg/networking/grpcgen/cds.go

    	svc := push.ServiceForHostname(node, hostname)
    	if svc == nil {
    		return nil, fmt.Errorf("cds gen for %s: did not find service for cluster %s", node.ID, defaultClusterName)
    	}
    
    	port, ok := svc.Ports.GetByPort(portNum)
    	if !ok {
    		return nil, fmt.Errorf("cds gen for %s: did not find port %d in service for cluster %s", node.ID, portNum, defaultClusterName)
    	}
    
    	return &clusterBuilder{
    		node: node,
    		push: push,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  3. pilot/pkg/model/service.go

    	for _, port := range ports {
    		if port.Name == name {
    			return port, true
    		}
    	}
    	return nil, false
    }
    
    // GetByPort retrieves a port declaration by port value
    func (ports PortList) GetByPort(num int) (*Port, bool) {
    	for _, port := range ports {
    		if port.Port == num && port.Protocol != protocol.UDP {
    			return port, true
    		}
    	}
    	return nil, false
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 02:03:58 UTC 2024
    - 46.3K bytes
    - Viewed (0)
  4. pilot/pkg/xds/endpoints/endpoint_builder.go

    func (b *EndpointBuilder) servicePort(port int) *model.Port {
    	if !b.ServiceFound() {
    		log.Debugf("can not find the service %s for cluster %s", b.hostname, b.clusterName)
    		return nil
    	}
    	svcPort, f := b.service.Ports.GetByPort(port)
    	if !f {
    		log.Debugf("can not find the service port %d for cluster %s", b.port, b.clusterName)
    		return nil
    	}
    	return svcPort
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 28 02:18:19 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  5. pilot/pkg/networking/core/cluster.go

    		for port, cluster := range servicePortClusters[service.Hostname.String()] {
    			// if this service port is removed, we can conclude that it is a removed cluster.
    			if _, exists := service.Ports.GetByPort(port); !exists {
    				deletedClusters = append(deletedClusters, cluster)
    			}
    		}
    	}
    	return services, deletedClusters
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 01:56:28 UTC 2024
    - 33K bytes
    - Viewed (0)
  6. pilot/pkg/networking/core/httproute.go

    		if listenerPort == 0 {
    			// Take all ports when listen port is 0 (http_proxy or uds)
    			// Expect virtualServices to resolve to right port
    			servicesByName[svc.Hostname] = svc
    		} else if svcPort, exists := svc.Ports.GetByPort(listenerPort); exists {
    			servicesByName[svc.Hostname] = &model.Service{
    				Hostname:       svc.Hostname,
    				DefaultAddress: svc.GetAddressForProxy(node),
    				MeshExternal:   svc.MeshExternal,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 32.7K bytes
    - Viewed (0)
Back to top