Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewSerializer (0.11 sec)

  1. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor.go

    	creater     runtime.ObjectCreater
    	typer       runtime.ObjectTyper
    	options     options
    }
    
    func NewSerializer(creater runtime.ObjectCreater, typer runtime.ObjectTyper, options ...Option) Serializer {
    	return newSerializer(&defaultMetaFactory{}, creater, typer, options...)
    }
    
    func newSerializer(metaFactory metaFactory, creater runtime.ObjectCreater, typer runtime.ObjectTyper, options ...Option) *serializer {
    	s := &serializer{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 13 14:57:12 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor_test.go

    			recognizes: true,
    		},
    		{
    			in:         []byte{0xff, 0xff, 0xff, 0x01, 0x02, 0x03},
    			recognizes: false,
    		},
    	} {
    		t.Run(hex.EncodeToString(tc.in), func(t *testing.T) {
    			s := NewSerializer(nil, nil)
    			recognizes, unknown, err := s.RecognizesData(tc.in)
    			if recognizes != tc.recognizes {
    				t.Errorf("expected recognized to be %t, got %t", tc.recognizes, recognizes)
    			}
    			if unknown {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 13 14:57:12 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  3. pkg/api/testing/unstructured_test.go

    				jsonSerializer := jsonserializer.NewSerializerWithOptions(jsonserializer.DefaultMetaFactory, legacyscheme.Scheme, legacyscheme.Scheme, jsonserializer.SerializerOptions{})
    				cborSerializer := cborserializer.NewSerializer(legacyscheme.Scheme, legacyscheme.Scheme)
    
    				// original->JSON->Unstructured
    				buf.Reset()
    				if err := jsonSerializer.Encode(item, &buf); err != nil {
    					t.Fatalf("error encoding native to json: %v", err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go

    		return false, apierrors.NewInternalError(fmt.Errorf("admission webhook %q attempted to modify the object, which is not supported for this operation", h.Name))
    	}
    
    	var patchedJS []byte
    	jsonSerializer := json.NewSerializer(json.DefaultMetaFactory, o.GetObjectCreater(), o.GetObjectTyper(), false)
    	switch result.PatchType {
    	// VerifyAdmissionResponse normalizes to v1 patch types, regardless of the AdmissionReview version used
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 19.6K bytes
    - Viewed (0)
Back to top