Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 14 of 14 for UnstructuredList (0.31 sec)

  1. staging/src/k8s.io/cli-runtime/pkg/printers/name.go

    		// callers and stop them from passing unflattened lists
    		// TODO chase the caller that is setting this and remove it.
    		if _, ok := obj.(*unstructured.UnstructuredList); !ok {
    			return fmt.Errorf("list types are not supported by name printing: %T", obj)
    		}
    
    		items, err := meta.ExtractList(obj)
    		if err != nil {
    			return err
    		}
    		for _, obj := range items {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 28 23:24:54 UTC 2019
    - 3.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers_test.go

    // i.e. that it does not mutate the object being encoded.
    func TestCodecOfUnstructuredList(t *testing.T) {
    	var wg sync.WaitGroup
    	concurrency := 10
    	list := UnstructuredList{
    		Object: map[string]interface{}{},
    	}
    	wg.Add(concurrency)
    	for i := 0; i < concurrency; i++ {
    		go func() {
    			defer wg.Done()
    			assert.NoError(t, UnstructuredJSONScheme.Encode(&list, ioutil.Discard))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 24 07:53:28 UTC 2021
    - 5.9K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/test/api_meta_help_test.go

    	for i := range list {
    		if e, a := list[i], pl.Items[i]; e != a {
    			t.Fatalf("%d: unmatched: %s", i, cmp.Diff(e, a))
    		}
    	}
    }
    
    func TestSetListToMatchingType(t *testing.T) {
    	pl := &unstructured.UnstructuredList{}
    	list := []runtime.Object{
    		&unstructured.Unstructured{Object: map[string]interface{}{"foo": 1}},
    		&unstructured.Unstructured{Object: map[string]interface{}{"foo": 2}},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go

    		// because the top-level type matches our desired destination type. actually send the object to the converter
    		// to give it a chance to convert the list items if needed.
    		if _, ok := obj.(*unstructured.UnstructuredList); !ok {
    			// avoid conversion roundtrip if GVK is the right one already or is empty (yes, this is a hack, but the old behaviour we rely on in kubectl)
    			objGVK := obj.GetObjectKind().GroupVersionKind()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 03 06:51:04 UTC 2023
    - 9.8K bytes
    - Viewed (0)
Back to top