Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 371 for CStream (0.06 sec)

  1. internal/grid/stream.go

    	// If the request context is canceled, the stream will no longer process requests.
    	// Requests sent cannot be used any further by the called.
    	Requests chan<- []byte
    
    	muxID uint64
    	ctx   context.Context
    }
    
    // Send a payload to the remote server.
    func (s *Stream) Send(b []byte) error {
    	if s.Requests == nil {
    		return errors.New("stream does not accept requests")
    	}
    	select {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  2. internal/s3select/json/preader.go

    					continue
    				}
    				dst, ok := r.kvDstPool.Get().([]jstream.KVS)
    				if !ok {
    					dst = make([]jstream.KVS, 0, 1000)
    				}
    
    				d := jstream.NewDecoder(bytes.NewBuffer(in.input), 0).ObjectAsKVS().MaxDepth(100)
    				stream := d.Stream()
    				all := dst[:0]
    				for mv := range stream {
    					var kvs jstream.KVS
    					if mv.ValueType == jstream.Object {
    						// This is a JSON object type (that preserves key
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. internal/s3select/jstream/README.md

    ```go
    decoder := jstream.NewDecoder(f, 2).EmitKV() // enable KV streaming at a depth level of 2
    ```
    
    ```
    jstream.KV{desc RGB}
    jstream.KV{colors [red green blue]}
    jstream.KV{desc CMYK}
    jstream.KV{colors [cyan magenta yellow black]}
    ```
    
    ## Installing 
    
    ```bash
    go get github.com/bcicen/jstream
    ```
    
    ## Commandline
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  4. internal/s3select/json/reader.go

    		}
    		return nil, io.EOF
    	}
    
    	var kvs jstream.KVS
    	if v.ValueType == jstream.Object {
    		// This is a JSON object type (that preserves key
    		// order)
    		kvs = v.Value.(jstream.KVS)
    	} else {
    		// To be AWS S3 compatible Select for JSON needs to
    		// output non-object JSON as single column value
    		// i.e. a map with `_1` as key and value as the
    		// non-object.
    		kvs = jstream.KVS{jstream.KV{Key: "_1", Value: v.Value}}
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  5. internal/s3select/sql/jsonpath_test.go

    	"reflect"
    	"testing"
    
    	"github.com/alecthomas/participle"
    	"github.com/minio/minio/internal/s3select/jstream"
    )
    
    func getJSONStructs(b []byte) ([]interface{}, error) {
    	dec := jstream.NewDecoder(bytes.NewBuffer(b), 0).ObjectAsKVS().MaxDepth(100)
    	var result []interface{}
    	for parsedVal := range dec.Stream() {
    		result = append(result, parsedVal.Value)
    	}
    	if err := dec.Err(); err != nil {
    		return nil, err
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  6. internal/s3select/jstream/decoder_test.go

    package jstream
    
    import (
    	"bytes"
    	"testing"
    )
    
    func mkReader(s string) *bytes.Reader { return bytes.NewReader([]byte(s)) }
    
    func TestDecoderSimple(t *testing.T) {
    	var (
    		counter int
    		mv      *MetaValue
    		body    = `[{"bio":"bada bing bada boom","id":1,"name":"Charles","falseVal":false}]`
    	)
    
    	decoder := NewDecoder(mkReader(body), 1)
    
    	for mv = range decoder.Stream() {
    		counter++
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  7. cmd/postpolicyform.go

    	var buf bytes.Buffer
    	e := json.NewEncoder(&buf)
    	d := jstream.NewDecoder(r, 0).ObjectAsKVS().MaxDepth(10)
    	sset := set.NewStringSet()
    	for mv := range d.Stream() {
    		var kvs jstream.KVS
    		if mv.ValueType == jstream.Object {
    			// This is a JSON object type (that preserves key order)
    			kvs = mv.Value.(jstream.KVS)
    			for _, kv := range kvs {
    				if sset.Contains(kv.Key) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  8. internal/s3select/jstream/decoder.go

    // values within the array are emitted to the stream, then the array
    // containing those values is emitted.
    func (d *Decoder) Recursive() *Decoder {
    	d.emitRecursive = true
    	return d
    }
    
    // Stream begins decoding from the underlying reader and returns a
    // streaming MetaValue channel for JSON values at the configured emitDepth.
    func (d *Decoder) Stream() chan *MetaValue {
    	go d.decode()
    	return d.metaCh
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/Streams.java

      }
    
      /**
       * Returns a {@link Stream} containing the elements of the first stream, followed by the elements
       * of the second stream, and so on.
       *
       * <p>This is equivalent to {@code Stream.of(streams).flatMap(stream -> stream)}, but the returned
       * stream may perform better.
       *
       * @see Stream#concat(Stream, Stream)
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 36.8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Streams.java

      }
    
      /**
       * Returns a {@link Stream} containing the elements of the first stream, followed by the elements
       * of the second stream, and so on.
       *
       * <p>This is equivalent to {@code Stream.of(streams).flatMap(stream -> stream)}, but the returned
       * stream may perform better.
       *
       * @see Stream#concat(Stream, Stream)
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 37.4K bytes
    - Viewed (0)
Back to top