- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 38 for NewEncoder (0.18 sec)
-
cmd/storage-datatypes_test.go
FSType: "xfs", RootDisk: true, Healing: true, Endpoint: "http://localhost:9001/tmp/drive1", MountPath: "/tmp/drive1", ID: "uuid", Error: "", } var buf bytes.Buffer gob.NewEncoder(&buf).Encode(v) encoded := buf.Bytes() b.Log("Size:", buf.Len(), "bytes") b.SetBytes(1) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { dec := gob.NewDecoder(bytes.NewBuffer(encoded))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 9.4K bytes - Viewed (0) -
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"`
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 21:31:13 UTC 2024 - 2.1K bytes - Viewed (0) -
docs/iam/access-manager-plugin.go
flag.StringVar(&certFile, "cert-file", "", "Path to TLS cert file") } func writeErrorResponse(w http.ResponseWriter, err error) { w.WriteHeader(http.StatusBadRequest) json.NewEncoder(w).Encode(map[string]string{ "error": fmt.Sprintf("%v", err), }) } type Result struct { Result bool `json:"result"` } func mainHandler(w http.ResponseWriter, r *http.Request) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 08 17:15:20 UTC 2024 - 2.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/PackageSanityTests.java
setDefault(String.class, "abcd"); setDefault(Method.class, AbstractPackageSanityTests.class.getDeclaredMethods()[0]); setDefault(MapMode.class, MapMode.READ_ONLY); setDefault(CharsetEncoder.class, UTF_8.newEncoder()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 1.3K 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() }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 28 04:44:00 UTC 2024 - 7K 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 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 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) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 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()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 28 00:22:30 UTC 2024 - 10.9K 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 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 11:32:32 UTC 2024 - 53.2K bytes - Viewed (0) -
buildscripts/heal-manual.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 27 09:47:58 UTC 2024 - 2.3K bytes - Viewed (0)