- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 44 for NewBuffer (0.21 sec)
-
internal/grid/types.go
j.val = nil } } // MarshalMsg implements msgp.Marshaler func (j *JSON[T]) MarshalMsg(b []byte) (o []byte, err error) { if j.val == nil { return msgp.AppendNil(b), nil } buf := bytes.NewBuffer(GetByteBuffer()[:0]) defer func() { PutByteBuffer(buf.Bytes()) }() enc := json.NewEncoder(buf) err = enc.Encode(j.val) if err != nil { return b, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 15.5K bytes - Viewed (0) -
istioctl/pkg/kubeinject/kubeinject.go
Namespace: deploymentNS, }, Response: nil, } revBytes, err := json.Marshal(rev) if err != nil { return nil, err } resp, err := client.Post(address, "application/json", bytes.NewBuffer(revBytes)) if err != nil { return nil, err } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { return nil, err } var obj runtime.Object
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 15 16:31:46 UTC 2024 - 21K bytes - Viewed (0) -
cmd/test-utils_test.go
if err != nil { t.Fatal(failTestStr(anonTestStr, err.Error())) } // creating 2 read closer (to set as request body) from the body content. readerOne := io.NopCloser(bytes.NewBuffer(buf)) readerTwo := io.NopCloser(bytes.NewBuffer(buf)) anonReq.Body = readerOne // call the HTTP handler. apiRouter.ServeHTTP(rec, anonReq) // expected error response when the unsigned HTTP request is not permitted.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 77K bytes - Viewed (0) -
internal/s3select/select.go
parquetSupport = env.Get("MINIO_API_SELECT_PARQUET", config.EnableOff) == config.EnableOn } var bufPool = sync.Pool{ New: func() interface{} { // make a buffer with a reasonable capacity. return bytes.NewBuffer(make([]byte, 0, maxRecordSize)) }, } var bufioWriterPool = sync.Pool{ New: func() interface{} { // io.Discard is just used to create the writer. Actual destination
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 21.2K bytes - Viewed (0) -
docs/debugging/xl-meta/main.go
if err != nil { return nil, err } b, _, minor, err := checkXL2V1(b) if err != nil { return nil, err } filemap[file] = make(map[string]string) buf := bytes.NewBuffer(nil) v0 := "" var data xlMetaInlineData switch minor { case 0: _, err = msgp.CopyToJSON(buf, bytes.NewReader(b)) if err != nil { return nil, err } case 1, 2:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 05 11:57:44 UTC 2024 - 40.3K bytes - Viewed (0) -
cmd/object_api_suite_test.go
for i := 1; i <= 10; i++ { expectedETaghex := getMD5Hash(data) var calcPartInfo PartInfo calcPartInfo, err = obj.PutObjectPart(context.Background(), "bucket", "key", uploadID, i, mustGetPutObjReader(t, bytes.NewBuffer(data), int64(len(data)), expectedETaghex, ""), opts) if err != nil { t.Errorf("%s: <ERROR> %s", instanceType, err) } if calcPartInfo.ETag != expectedETaghex { t.Errorf("MD5 Mismatch") }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 02 15:13:05 UTC 2024 - 33.3K bytes - Viewed (0) -
cmd/object-api-utils.go
} } const skip = 2<<20 + 511 r, _ := newS2CompressReader(bytes.NewBuffer(data), int64(len(data)), true) b, err := io.ReadAll(r) failOnErr(err) failOnErr(r.Close()) // Decompression reader. s2Reader := s2.NewReader(bytes.NewBuffer(b)) // Apply the skipLen on the decompressed stream. failOnErr(s2Reader.Skip(skip)) got, err := io.ReadAll(s2Reader)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 37.1K bytes - Viewed (0) -
cmd/erasure-healing.go
partPath := pathJoin(tmpID, dstDataDir, fmt.Sprintf("part.%d", partNumber)) if len(inlineBuffers) > 0 { buf := grid.GetByteBufferCap(int(erasure.ShardFileSize(latestMeta.Size)) + 64) inlineBuffers[i] = bytes.NewBuffer(buf[:0]) defer grid.PutByteBuffer(buf) writers[i] = newStreamingBitrotWriterBuffer(inlineBuffers[i], DefaultBitrotAlgorithm, erasure.ShardSize()) } else {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Oct 02 17:50:41 UTC 2024 - 34.4K bytes - Viewed (0) -
cmd/erasure-object.go
for i, disk := range onlineDisks { if disk == nil { continue } if disk.IsOnline() { buf := grid.GetByteBufferCap(int(erasure.ShardFileSize(data.Size())) + 64) inlineBuffers[i] = bytes.NewBuffer(buf[:0]) defer grid.PutByteBuffer(buf) writers[i] = newStreamingBitrotWriterBuffer(inlineBuffers[i], DefaultBitrotAlgorithm, erasure.ShardSize()) } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 78.8K bytes - Viewed (0) -
cmd/peer-rest-server.go
}) if err != nil { return grid.NewRemoteErr(err) } // Process until remote disconnects. // Blocks on upstream (out) congestion. // We have however a dynamic downstream buffer (ch). buf := bytes.NewBuffer(grid.GetByteBuffer()) enc := json.NewEncoder(buf) tmpEvt := struct{ Records []event.Event }{[]event.Event{{}}} for { select { case <-ctx.Done(): grid.PutByteBuffer(buf.Bytes()) return 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)