Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for addressToEndpoint (0.21 sec)

  1. pkg/controller/endpointslicemirroring/utils.go

    	if len(validation.ValidateEndpointSliceName(prefix, true)) != 0 {
    		prefix = serviceName
    	}
    	return prefix
    }
    
    // addressToEndpoint converts an address from an Endpoints resource to an
    // EndpointSlice endpoint.
    func addressToEndpoint(address corev1.EndpointAddress, ready bool) *discovery.Endpoint {
    	endpoint := &discovery.Endpoint{
    		Addresses: []string{address.IP},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 18:08:12 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  2. pkg/controller/endpointslicemirroring/reconciler_helpers.go

    // returns false if the address was invalid.
    func (d *desiredCalc) addAddress(address v1.EndpointAddress, multiKey multiAddrTypePortMapKey, ready bool) bool {
    	endpoint := addressToEndpoint(address, ready)
    	addrType := getAddressType(address.IP)
    	if addrType == nil {
    		return false
    	}
    
    	d.endpointsByKey[multiKey[*addrType]].Insert(endpoint)
    	d.numDesiredEndpoints++
    	return true
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 18:08:12 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  3. pkg/controller/endpointslicemirroring/utils_test.go

    		},
    		TargetRef: &v1.ObjectReference{
    			APIVersion: "v1",
    			Kind:       "Pod",
    			Namespace:  "default",
    			Name:       "foo",
    		},
    		NodeName: pointer.String("node-abc"),
    	}
    
    	ep := addressToEndpoint(epAddress, ready)
    	assert.EqualValues(t, expectedEndpoint, *ep)
    }
    
    // Test helpers
    
    func newClientset() *fake.Clientset {
    	client := fake.NewSimpleClientset()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 23 15:40:23 UTC 2022
    - 7.5K bytes
    - Viewed (0)
Back to top