Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 41 for decodeUint (0.2 sec)

  1. cmd/kubeadm/app/util/config/resetconfiguration.go

    	}
    
    	if len(resetBytes) == 0 {
    		return nil, errors.Errorf("no %s found in the supplied config", constants.JoinConfigurationKind)
    	}
    
    	internalcfg := &kubeadmapi.ResetConfiguration{}
    	if err := runtime.DecodeInto(kubeadmscheme.Codecs.UniversalDecoder(), resetBytes, 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.6K bytes
    - Viewed (0)
  2. src/image/jpeg/scan.go

    func (d *decoder) refine(b *block, h *huffman, zigStart, zigEnd, delta int32) error {
    	// Refining a DC component is trivial.
    	if zigStart == 0 {
    		if zigEnd != 0 {
    			panic("unreachable")
    		}
    		bit, err := d.decodeBit()
    		if err != nil {
    			return err
    		}
    		if bit {
    			b[0] |= delta
    		}
    		return nil
    	}
    
    	// Refining AC components is more complicated; see sections G.1.2.2 and G.1.2.3.
    	zig := zigStart
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 25 00:46:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  3. tests/fuzz/crd_roundtrip_fuzzer.go

    	}
    
    	// decode the encoded data into a new object (instead of letting the codec
    	// create a new object)
    	obj3 := reflect.New(reflect.TypeOf(object).Elem()).Interface().(runtime.Object)
    	if err := runtime.DecodeInto(codec, data, obj3); err != nil {
    		panic(fmt.Sprintf("%v: %v\n", name, err))
    	}
    
    	// ensure that the object produced from decoding the encoded data is equal
    	// to the original object
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 01 01:34:15 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/util/config/initconfiguration.go

    			// Decode the bytes into the internal struct. Under the hood, the bytes will be unmarshalled into the
    			// right external version, defaulted, and converted into the internal version.
    			if err := runtime.DecodeInto(kubeadmscheme.Codecs.UniversalDecoder(), fileContent, initcfg); err != nil {
    				return nil, err
    			}
    			continue
    		}
    		if kubeadmutil.GroupVersionKindsHasClusterConfiguration(gvk) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 05 12:41:16 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/util/config/upgradeconfiguration.go

    			// Decode the bytes into the internal struct. Under the hood, the bytes will be unmarshalled into the
    			// right external version, defaulted, and converted into the internal version.
    			if err := runtime.DecodeInto(kubeadmscheme.Codecs.UniversalDecoder(), bytes, internalcfg); err != nil {
    				return nil, err
    			}
    			continue
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 11:04:08 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  6. src/image/jpeg/huffman.go

    		d.bits.m >>= 1
    		if code <= h.maxCodes[i] {
    			return h.vals[h.valsIndices[i]+code-h.minCodes[i]], nil
    		}
    		code <<= 1
    	}
    	return 0, FormatError("bad Huffman code")
    }
    
    func (d *decoder) decodeBit() (bool, error) {
    	if d.bits.n == 0 {
    		if err := d.ensureNBits(1); err != nil {
    			return false, err
    		}
    	}
    	ret := d.bits.a&d.bits.m != 0
    	d.bits.n--
    	d.bits.m >>= 1
    	return ret, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:08:05 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/roundtrip.go

    	obj3 := reflect.New(reflect.TypeOf(object).Elem()).Interface().(runtime.Object)
    	if err := runtime.DecodeInto(codec, data, obj3); err != nil {
    		t.Errorf("%v: %v", name, err)
    		return
    	}
    
    	// special case for kinds which are internal and external at the same time (many in meta.k8s.io are). For those
    	// runtime.DecodeInto above will return the external variant and set the APIVersion and kind, while the input
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 16.8K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/phases/addons/proxy/proxy_test.go

    	for _, testCase := range testCases {
    		t.Run(testCase.name, func(t *testing.T) {
    			daemonSetBytes, _ := kubeadmutil.ParseTemplate(testCase.manifest, testCase.data)
    			daemonSet := &apps.DaemonSet{}
    			if err := runtime.DecodeInto(clientsetscheme.Codecs.UniversalDecoder(), daemonSetBytes, daemonSet); err != nil {
    				t.Errorf("unexpected error: %v", err)
    			}
    			if daemonSet.Spec.Template.Spec.PriorityClassName != "system-node-critical" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 18 11:14:32 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/test/runtime_serializer_protobuf_protobuf_test.go

    			},
    			data: wire2,
    		},
    	}
    
    	for i, test := range testCases {
    		s := protobuf.NewSerializer(nil, nil)
    		unk := &runtime.Unknown{}
    		err := runtime.DecodeInto(s, test.data, unk)
    
    		switch {
    		case err == nil && test.errFn != nil:
    			t.Errorf("%d: failed: %v", i, err)
    			continue
    		case err != nil && test.errFn == nil:
    			t.Errorf("%d: failed: %v", i, err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:16 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  10. cmd/kubeadm/app/util/config/cluster.go

    		kubeadmapiv1.SchemeGroupVersion.WithKind(constants.ClusterConfigurationKind),
    		[]byte(clusterConfigurationData)); err != nil {
    		klog.Warning(err.Error())
    	}
    	if err := runtime.DecodeInto(kubeadmscheme.Codecs.UniversalDecoder(), []byte(clusterConfigurationData), &initcfg.ClusterConfiguration); err != nil {
    		return nil, errors.Wrap(err, "failed to decode cluster configuration data")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 11:04:08 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top