Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for NewFrameReader (0.22 sec)

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

    func (jsonFramer) NewFrameWriter(w io.Writer) io.Writer {
    	// we can write JSON objects directly to the writer, because they are self-framing
    	return w
    }
    
    // NewFrameReader implements stream framing for this serializer
    func (jsonFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser {
    	// we need to extract the JSON chunks of data to pass to Decode()
    	return framer.NewJSONFramedReader(r)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 25 16:08:07 UTC 2022
    - 12K bytes
    - Viewed (0)
  2. pkg/api/testing/serialization_test.go

    		}
    		out := &bytes.Buffer{}
    		w := framer.NewFrameWriter(out)
    		if n, err := w.Write(obj.Bytes()); err != nil || n != len(obj.Bytes()) {
    			t.Fatal(err)
    		}
    		sr := streaming.NewDecoder(framer.NewFrameReader(io.NopCloser(out)), s)
    		resultSecret := &v1.Secret{}
    		res, _, err := sr.Decode(nil, resultSecret)
    		if err != nil {
    			t.Fatalf("%v:\n%s", err, hex.Dump(obj.Bytes()))
    		}
    		resultSecret.Kind = "Secret"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 25 11:04:08 UTC 2023
    - 19.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/runtime/helper.go

    }
    
    // DefaultFramer is valid for any stream that can read objects serially without
    // any separation in the stream.
    var DefaultFramer = defaultFramer{}
    
    type defaultFramer struct{}
    
    func (defaultFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser { return r }
    func (defaultFramer) NewFrameWriter(w io.Writer) io.Writer         { return w }
    
    // WithVersionEncoder serializes an object and ensures the GVK is set.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Dec 13 22:54:34 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go

    func (lengthDelimitedFramer) NewFrameWriter(w io.Writer) io.Writer {
    	return framer.NewLengthDelimitedFrameWriter(w)
    }
    
    // NewFrameReader implements stream framing for this serializer
    func (lengthDelimitedFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser {
    	return framer.NewLengthDelimitedFrameReader(r)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 23 13:38:23 UTC 2022
    - 17.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go

    	EncodeParameters(obj Object, to schema.GroupVersion) (url.Values, error)
    }
    
    // Framer is a factory for creating readers and writers that obey a particular framing pattern.
    type Framer interface {
    	NewFrameReader(r io.ReadCloser) io.ReadCloser
    	NewFrameWriter(w io.Writer) io.Writer
    }
    
    // SerializerInfo contains information about a specific serialization format
    type SerializerInfo struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun May 28 03:26:35 UTC 2023
    - 19K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/endpoints/watch_test.go

    				}
    				objectCodec := codecs.DecoderToVersion(info.Serializer, testInternalGroupVersion)
    
    				var fr io.ReadCloser = r
    				if !protocol.selfFraming {
    					fr = streamSerializer.Framer.NewFrameReader(r)
    				}
    				d := streaming.NewDecoder(fr, streamSerializer.Serializer)
    
    				var w *watch.FakeWatcher
    				for w == nil {
    					w = simpleStorage.Watcher()
    					time.Sleep(time.Millisecond)
    				}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 30 17:27:39 UTC 2023
    - 30K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go

    	if !ok || info.StreamSerializer == nil {
    		panic(info)
    	}
    	streamSerializer := info.StreamSerializer
    	fr := streamSerializer.Framer.NewFrameReader(r)
    	d := streaming.NewDecoder(fr, streamSerializer.Serializer)
    	return d
    }
    
    func TestGetPartialObjectMetadata(t *testing.T) {
    	now := metav1.Time{Time: metav1.Now().Rfc3339Copy().Local()}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 20:15:22 UTC 2023
    - 158.7K bytes
    - Viewed (0)
Back to top