- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 42 for newEncoder (1.97 sec)
-
docs/iam/identity-manager-plugin.go
package main import ( "encoding/json" "errors" "fmt" "log" "net/http" ) func writeErrorResponse(w http.ResponseWriter, err error) { w.WriteHeader(http.StatusBadRequest) json.NewEncoder(w).Encode(map[string]string{ "reason": fmt.Sprintf("%v", err), }) } type Resp struct { User string `json:"user"`
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed May 01 21:31:13 GMT 2024 - 2.1K bytes - Viewed (0) -
cmd/listen-notification-handlers.go
localCh := make(chan event.Event, globalAPIConfig.getRequestsPoolCapacity()) // Convert local messages to JSON and send to mergeCh go func() { buf := bytes.NewBuffer(grid.GetByteBuffer()[:0]) enc := json.NewEncoder(buf) tmpEvt := struct{ Records []event.Event }{[]event.Event{{}}} for { select { case ev := <-localCh: buf.Reset() tmpEvt.Records[0] = ev if err := enc.Encode(tmpEvt); err != nil {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 6K bytes - Viewed (0) -
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 {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 51.8K bytes - Viewed (0) -
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 interface{}) []byte { var bytesBuffer bytes.Buffer e := json.NewEncoder(&bytesBuffer) e.Encode(response) return bytesBuffer.Bytes() }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 6.9K bytes - Viewed (1) -
schema/serializer.go
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 08:28:46 GMT 2024 - 4.6K bytes - Viewed (0) -
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) {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Apr 15 09:40:39 GMT 2024 - 19.4K bytes - Viewed (0) -
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()
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 10.9K bytes - Viewed (0) -
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, })
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Apr 29 17:39:04 GMT 2024 - 97.8K bytes - Viewed (2) -
buildscripts/heal-manual.go
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Feb 27 09:47:58 GMT 2024 - 2.3K bytes - Viewed (0) -
internal/logger/logrotate.go
func (w *Writer) Close() error { w.pw.CloseWithError(nil) if w.f != nil { if err := w.closeCurrentFile(); err != nil { return err } } return nil } var stdErrEnc = json.NewEncoder(os.Stderr) func (w *Writer) listen() { for { var r io.Reader = w.pr if w.opts.MaximumFileSize > 0 { r = io.LimitReader(w.pr, w.opts.MaximumFileSize) } if _, err := io.Copy(w.f, r); err != nil {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu May 02 11:38:40 GMT 2024 - 5.8K bytes - Viewed (0)