Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 37 for newEncoder (0.27 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. cmd/api-headers.go

    	var buf bytes.Buffer
    	buf.WriteString(xxml.Header)
    	if err := xxml.NewEncoder(&buf).Encode(response); err != nil {
    		bugLogIf(GlobalContext, err)
    		return nil
    	}
    	return buf.Bytes()
    }
    
    // Encodes the response headers into JSON format.
    func encodeResponseJSON(response any) []byte {
    	var bytesBuffer bytes.Buffer
    	e := json.NewEncoder(&bytesBuffer)
    	e.Encode(response)
    	return bytesBuffer.Bytes()
    }
    
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 8.6K bytes
    - Click Count (0)
  2. cmd/admin-handlers-site-replication.go

    		return
    	}
    
    	info, err := globalSiteReplicationSys.GetClusterInfo(ctx)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	if err = json.NewEncoder(w).Encode(info); err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    }
    
    func (a adminAPIHandlers) SRPeerGetIDPSettings(w http.ResponseWriter, r *http.Request) {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 19.4K bytes
    - Click Count (0)
  3. cmd/admin-handlers-pools.go

    		return
    	}
    
    	status, err := pools.Status(r.Context(), idx)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	adminLogIf(r.Context(), json.NewEncoder(w).Encode(&status))
    }
    
    func (a adminAPIHandlers) ListPools(w http.ResponseWriter, r *http.Request) {
    	ctx := r.Context()
    
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 11.1K bytes
    - Click Count (0)
  4. schema/serializer.go

    	buf := new(bytes.Buffer)
    	err := gob.NewEncoder(buf).Encode(fieldValue)
    	return buf.Bytes(), err
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Sun Oct 26 12:29:44 GMT 2025
    - 5.1K bytes
    - Click Count (0)
  5. 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, any) {
    	return sql.SelectFmtCSV, r
    }
    
    // Replace - is not supported for CSV
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 4.1K bytes
    - Click Count (0)
  6. 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,
    		})
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 99.7K bytes
    - Click Count (0)
  7. cmd/callhome.go

    	var b bytes.Buffer
    	gzWriter := gzip.NewWriter(&b)
    
    	header := struct {
    		Version string `json:"version"`
    	}{Version: healthInfo.Version}
    
    	enc := json.NewEncoder(gzWriter)
    	if e := enc.Encode(header); e != nil {
    		internalLogIf(ctx, fmt.Errorf("Could not encode health info header: %w", e))
    		return nil
    	}
    
    	if e := enc.Encode(healthInfo); e != nil {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 5.3K bytes
    - Click Count (0)
  8. internal/s3select/json/record.go

    func (r *Record) Raw() (sql.SelectObjectFormat, any) {
    	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 any) error {
    	v, ok := k.(jstream.KVS)
    	if !ok {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 5.2K bytes
    - Click Count (0)
  9. 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 {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 7.8K bytes
    - Click Count (0)
  10. cmd/metrics-v3-handler.go

    		contentType := r.Header.Get("Content-Type")
    		if contentType == "application/json" {
    			w.Header().Set("Content-Type", "application/json")
    			jsonEncoder := json.NewEncoder(w)
    			jsonEncoder.Encode(metrics)
    			return
    		}
    
    		// If not JSON, return plain text. We format it as a markdown table for
    		// readability.
    		w.Header().Set("Content-Type", "text/plain")
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Oct 10 18:57:03 GMT 2025
    - 7.7K bytes
    - Click Count (0)
Back to Top