Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NewEquivalentResourceRegistryWithIdentity (0.24 sec)

  1. staging/src/k8s.io/apimachinery/pkg/runtime/mapper.go

    	return &equivalentResourceRegistry{}
    }
    
    // NewEquivalentResourceRegistryWithIdentity creates a resource mapper with a custom identity function.
    // If "" is returned by the function, GroupResource#String is used as the identity.
    // GroupResources with the same identity string are considered equivalent.
    func NewEquivalentResourceRegistryWithIdentity(keyFunc func(schema.GroupResource) string) EquivalentResourceRegistry {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 18:26:06 UTC 2019
    - 3.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/runtime/mapper_test.go

    		},
    	}
    
    	for _, tc := range testcases {
    		t.Run(tc.Name, func(t *testing.T) {
    			mapper := NewEquivalentResourceRegistryWithIdentity(tc.IdentityFunc)
    
    			// register
    			for _, data := range kindsToRegister {
    				mapper.RegisterKindFor(data.gvr, data.subresource, data.gvk)
    			}
    			// verify
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 6.7K bytes
    - Viewed (0)
Back to top