Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for NewEncoder (0.08 sec)

  1. cmd/peer-rest-server.go

    		return
    	}
    
    	ctx := newContext(r, w, "DownloadProfiling")
    	profileData, err := getProfileData()
    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    	peersLogIf(ctx, gob.NewEncoder(w).Encode(profileData))
    }
    
    func (s *peerRESTServer) LocalStorageInfoHandler(mss *grid.MSS) (*grid.JSON[madmin.StorageInfo], *grid.RemoteErr) {
    	objLayer := newObjectLayerFn()
    	if objLayer == nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 53.2K bytes
    - Viewed (0)
  2. internal/s3select/csv/record.go

    	var kvs jstream.KVS = make([]jstream.KV, 0, len(r.columnNames))
    	for i, cn := range r.columnNames {
    		if i < len(r.csvRecord) {
    			kvs = append(kvs, jstream.KV{Key: cn, Value: r.csvRecord[i]})
    		}
    	}
    	return json.NewEncoder(writer).Encode(kvs)
    }
    
    // Raw - returns the underlying data with format info.
    func (r *Record) Raw() (sql.SelectObjectFormat, interface{}) {
    	return sql.SelectFmtCSV, r
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  3. internal/event/target/elasticsearch.go

    func (c *esClientV7) updateEntry(ctx context.Context, index string, key string, eventData event.Event) error {
    	doc := map[string]interface{}{
    		"Records": []event.Event{eventData},
    	}
    	var buf bytes.Buffer
    	enc := json.NewEncoder(&buf)
    	err := enc.Encode(doc)
    	if err != nil {
    		return err
    	}
    	res, err := c.Index(
    		index,
    		&buf,
    		c.Index.WithDocumentID(key),
    		c.Index.WithContext(ctx),
    	)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 15K bytes
    - Viewed (0)
  4. cmd/admin-handlers.go

    			}
    		}
    	}
    	dID := r.Form.Get("by-depID")
    	done := ctx.Done()
    	ticker := time.NewTicker(interval)
    	defer ticker.Stop()
    	w.Header().Set(xhttp.ContentType, string(mimeJSON))
    
    	enc := json.NewEncoder(w)
    	for n > 0 {
    		var m madmin.RealtimeMetrics
    		mLocal := collectLocalMetrics(types, collectMetricsOpts{
    			hosts: hostMap,
    			disks: diskMap,
    			jobID: jobID,
    			depID: dID,
    		})
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 99.7K bytes
    - Viewed (0)
  5. internal/s3select/json/record.go

    func (r *Record) Raw() (sql.SelectObjectFormat, interface{}) {
    	return r.SelectFormat, r.KVS
    }
    
    // WriteJSON - encodes to JSON data.
    func (r *Record) WriteJSON(writer io.Writer) error {
    	return json.NewEncoder(writer).Encode(r.KVS)
    }
    
    // Replace the underlying buffer of json data.
    func (r *Record) Replace(k interface{}) error {
    	v, ok := k.(jstream.KVS)
    	if !ok {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  6. internal/store/queuestore.go

    func (store *QueueStore[I]) multiWrite(key Key, items []I) (err error) {
    	buf := bytebufferpool.Get()
    	defer bytebufferpool.Put(buf)
    
    	enc := jsoniter.ConfigCompatibleWithStandardLibrary.NewEncoder(buf)
    
    	for i := range items {
    		if err = enc.Encode(items[i]); err != nil {
    			return err
    		}
    	}
    
    	path := filepath.Join(store.directory, key.String())
    	if key.Compress {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/ReaderInputStream.java

       * @throws IllegalArgumentException if bufferSize is non-positive
       */
      ReaderInputStream(Reader reader, Charset charset, int bufferSize) {
        this(
            reader,
            charset
                .newEncoder()
                .onMalformedInput(CodingErrorAction.REPLACE)
                .onUnmappableCharacter(CodingErrorAction.REPLACE),
            bufferSize);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/io/ReaderInputStream.java

       * @throws IllegalArgumentException if bufferSize is non-positive
       */
      ReaderInputStream(Reader reader, Charset charset, int bufferSize) {
        this(
            reader,
            charset
                .newEncoder()
                .onMalformedInput(CodingErrorAction.REPLACE)
                .onUnmappableCharacter(CodingErrorAction.REPLACE),
            bufferSize);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  9. cmd/postpolicyform.go

    //
    // Go stdlib doesn't support parsing JSON with duplicate
    // keys, so we need to use this technique to merge the
    // keys.
    func sanitizePolicy(r io.Reader) (io.Reader, error) {
    	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 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  10. cmd/admin-bucket-handlers.go

    	defer keepAliveTicker.Stop()
    
    	diffCh, err := getReplicationDiff(ctx, objectAPI, bucket, opts)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    	enc := json.NewEncoder(w)
    	for {
    		select {
    		case entry, ok := <-diffCh:
    			if !ok {
    				return
    			}
    			if err := enc.Encode(entry); err != nil {
    				return
    			}
    			if len(diffCh) == 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 28 15:32:18 UTC 2024
    - 33.2K bytes
    - Viewed (0)
Back to top