Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for decodeUint (0.16 sec)

  1. src/encoding/gob/decgen.go

    		"bool",
    		"Bool",
    		`slice[i] = state.decodeUint() != 0`,
    	},
    	{
    		"complex64",
    		"Complex64",
    		`real := float32FromBits(state.decodeUint(), ovfl)
    		imag := float32FromBits(state.decodeUint(), ovfl)
    		slice[i] = complex(float32(real), float32(imag))`,
    	},
    	{
    		"complex128",
    		"Complex128",
    		`real := float64FromBits(state.decodeUint())
    		imag := float64FromBits(state.decodeUint())
    		slice[i] = complex(real, imag)`,
    	},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 14:15:38 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/runtime/helper.go

    	for _, decoder := range decoders {
    		if err := DecodeInto(decoder, obj.Raw, obj); err == nil {
    			return obj, nil
    		}
    	}
    	return obj, nil
    }
    
    // DecodeList alters the list in place, attempting to decode any objects found in
    // the list that have the Unknown type. Any errors that occur are returned
    // after the entire list is processed. Decoders are tried in order.
    func DecodeList(objects []Object, decoders ...Decoder) []error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Dec 13 22:54:34 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/runtime/registry_test.go

    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			var pluginFooConf PluginFooConfig
    			if err := DecodeInto(test.args, &pluginFooConf); err != nil {
    				t.Errorf("DecodeInto(): failed to decode args %+v: %v", test.args, err)
    			}
    			if !reflect.DeepEqual(test.expected, pluginFooConf) {
    				t.Errorf("DecodeInto(): failed to decode plugin config, expected: %+v, got: %+v",
    					test.expected, pluginFooConf)
    			}
    		})
    	}
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 20 09:49:54 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/runtime/registry.go

    	return func(ctx context.Context, plArgs runtime.Object, fh framework.Handle) (framework.Plugin, error) {
    		return withFts(ctx, plArgs, fh, fts)
    	}
    }
    
    // DecodeInto decodes configuration whose type is *runtime.Unknown to the interface into.
    func DecodeInto(obj runtime.Object, into interface{}) error {
    	if obj == nil {
    		return nil
    	}
    	configuration, ok := obj.(*runtime.Unknown)
    	if !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 20 09:49:54 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  5. pkg/api/testing/conversion_test.go

    }
    
    func BenchmarkNodeConversion(b *testing.B) {
    	data, err := os.ReadFile("node_example.json")
    	if err != nil {
    		b.Fatalf("Unexpected error while reading file: %v", err)
    	}
    	var node api.Node
    	if err := runtime.DecodeInto(legacyscheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), data, &node); err != nil {
    		b.Fatalf("Unexpected error decoding node: %v", err)
    	}
    
    	scheme := legacyscheme.Scheme
    	var result *api.Node
    	b.ResetTimer()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 30 06:49:09 UTC 2021
    - 3.9K bytes
    - Viewed (0)
  6. pkg/api/testing/deep_copy_test.go

    }
    
    func BenchmarkNodeCopy(b *testing.B) {
    	data, err := os.ReadFile("node_example.json")
    	if err != nil {
    		b.Fatalf("Unexpected error while reading file: %v", err)
    	}
    	var node api.Node
    	if err := runtime.DecodeInto(legacyscheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), data, &node); err != nil {
    		b.Fatalf("Unexpected error decoding node: %v", err)
    	}
    
    	var result *api.Node
    	for i := 0; i < b.N; i++ {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 31 14:16:53 UTC 2022
    - 4.7K bytes
    - Viewed (0)
  7. staging/src/k8s.io/cli-runtime/pkg/printers/json_test.go

    		t.Fatal(err)
    	}
    	// Use real decode function to undo the versioning process.
    	poutput = TestStruct{}
    	s := scheme.Codecs.UniversalDecoder(scheme.Scheme.PrioritizedVersionsAllGroups()...)
    	if err := runtime.DecodeInto(s, buf.Bytes(), &poutput); err != nil {
    		t.Fatal(err)
    	}
    	if !reflect.DeepEqual(testData, poutput) {
    		t.Errorf("Test data and unmarshaled data are not equal: %v", cmp.Diff(poutput, testData))
    	}
    
    	obj := &v1.Pod{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/runtime/codec_check.go

    			return fmt.Errorf("external type %s not interpretable: %v", et, err)
    		}
    		if reflect.TypeOf(obj) != reflect.TypeOf(internalType) {
    			return fmt.Errorf("decode of external type %s produced: %#v", et, obj)
    		}
    		if err = DecodeInto(c, exBytes, internalType); err != nil {
    			return fmt.Errorf("external type %s not convertible to internal type: %v", et, err)
    		}
    	}
    	return nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 27 07:07:03 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go

    	decodeInto := into
    	if into != nil {
    		if _, ok := into.(runtime.Unstructured); ok && !into.GetObjectKind().GroupVersionKind().GroupVersion().Empty() {
    			decodeInto = reflect.New(reflect.TypeOf(into).Elem()).Interface().(runtime.Object)
    		}
    	}
    
    	var strictDecodingErrs []error
    	obj, gvk, err := c.decoder.Decode(data, defaultGVK, decodeInto)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 03 06:51:04 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  10. cmd/kubeadm/app/phases/addons/proxy/proxy.go

    	}
    
    	if printManifest {
    		return configMapBytes, nil
    	}
    
    	kubeproxyConfigMap := &v1.ConfigMap{}
    	if err := kuberuntime.DecodeInto(clientsetscheme.Codecs.UniversalDecoder(), configMapBytes, kubeproxyConfigMap); err != nil {
    		return []byte(""), errors.Wrap(err, "unable to decode kube-proxy configmap")
    	}
    
    	if !kubeProxyCfg.IsUserSupplied() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 26 13:23:44 UTC 2023
    - 8.1K bytes
    - Viewed (0)
Back to top