Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 41 for decodeUint (0.15 sec)

  1. 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)
  2. 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)
  3. staging/src/k8s.io/apiserver/pkg/registry/rest/rest.go

    type Storage interface {
    	// New returns an empty object that can be used with Create and Update after request data has been put into it.
    	// This object must be a pointer type for use with Codec.DecodeInto([]byte, runtime.Object)
    	New() runtime.Object
    
    	// Destroy cleans up its resources on shutdown.
    	// Destroy has to be implemented in thread-safe way and be prepared
    	// for being called more than once.
    	Destroy()
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 20 14:29:25 UTC 2023
    - 18.6K bytes
    - Viewed (0)
  4. 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)
  5. pkg/api/testing/serialization_test.go

    	t.Logf("rs.v1.apps -> rc._internal")
    	if err := runtime.DecodeInto(decoder, data, rc); err != nil {
    		t.Fatalf("unexpected decoding error: %v", err)
    	}
    
    	t.Logf("rc._internal -> rc.v1")
    	data, err = runtime.Encode(defaultCodec, rc)
    	if err != nil {
    		t.Fatalf("unexpected encoding error: %v", err)
    	}
    
    	t.Logf("rc.v1 -> rs._internal.apps")
    	if err := runtime.DecodeInto(decoder, data, rs); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 25 11:04:08 UTC 2023
    - 19.3K bytes
    - Viewed (0)
  6. 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)
  7. cmd/kubeadm/app/phases/uploadconfig/uploadconfig_test.go

    				if configData == "" {
    					t2.Fatal("Fail to find ClusterConfigurationConfigMapKey key")
    				}
    
    				decodedCfg := &kubeadmapi.ClusterConfiguration{}
    				if err := runtime.DecodeInto(kubeadmscheme.Codecs.UniversalDecoder(), []byte(configData), decodedCfg); err != nil {
    					t2.Fatalf("unable to decode config from bytes: %v", err)
    				}
    
    				if len(decodedCfg.ComponentConfigs) != 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 24 08:46:51 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/util/config/joinconfiguration.go

    	}
    
    	if len(joinBytes) == 0 {
    		return nil, errors.Errorf("no %s found in the supplied config", constants.JoinConfigurationKind)
    	}
    
    	internalcfg := &kubeadmapi.JoinConfiguration{}
    	if err := runtime.DecodeInto(kubeadmscheme.Codecs.UniversalDecoder(), joinBytes, internalcfg); err != nil {
    		return nil, err
    	}
    
    	// Applies dynamic defaults to settings not provided with flags
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 05 12:41:16 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/server/options/tracing.go

    	}
    	internalConfig := &apiserver.TracingConfiguration{}
    	// this handles json/yaml/whatever, and decodes all registered version to the internal version
    	if err := runtime.DecodeInto(codecs.UniversalDecoder(), data, internalConfig); err != nil {
    		return nil, fmt.Errorf("unable to decode tracing configuration data: %v", err)
    	}
    	return &internalConfig.TracingConfiguration, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 07 21:39:39 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/runtime/codec.go

    // Decode is a convenience wrapper for decoding data into an Object.
    func Decode(d Decoder, data []byte) (Object, error) {
    	obj, _, err := d.Decode(data, nil, nil)
    	return obj, err
    }
    
    // DecodeInto performs a Decode into the provided object.
    func DecodeInto(d Decoder, data []byte, into Object) error {
    	out, gvk, err := d.Decode(data, nil, into)
    	if err != nil {
    		return err
    	}
    	if out != into {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 03:20:30 UTC 2023
    - 12.1K bytes
    - Viewed (0)
Back to top