- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 131 for Writer (0.16 sec)
-
cmd/erasure-encode.go
import ( "context" "fmt" "io" "sync" ) // Writes in parallel to writers type parallelWriter struct { writers []io.Writer writeQuorum int errs []error } // Write writes data to writers in parallel. func (p *parallelWriter) Write(ctx context.Context, blocks [][]byte) error { var wg sync.WaitGroup for i := range p.writers { if p.writers[i] == nil { p.errs[i] = errDiskNotFound continue
Go - Registered: Sun Apr 14 19:28:10 GMT 2024 - Last Modified: Wed Jan 31 02:11:45 GMT 2024 - 3K bytes - Viewed (0) -
internal/ioutil/ioutil.go
// executes at least one write operation if it is closed. // // This can be useful within the context of HTTP. At least // one write operation must happen to send the HTTP headers // to the peer. type WriteOnCloser struct { io.Writer hasWritten bool } func (w *WriteOnCloser) Write(p []byte) (int, error) { w.hasWritten = true return w.Writer.Write(p) }
Go - Registered: Sun Apr 07 19:28:10 GMT 2024 - Last Modified: Fri Mar 15 19:27:59 GMT 2024 - 10.6K bytes - Viewed (0) -
internal/ioutil/ioutil_test.go
} } func TestCloseOnWriter(t *testing.T) { writer := WriteOnClose(io.Discard) if writer.HasWritten() { t.Error("WriteOnCloser must not be marked as HasWritten") } writer.Write(nil) if !writer.HasWritten() { t.Error("WriteOnCloser must be marked as HasWritten") } writer = WriteOnClose(io.Discard) writer.Close() if !writer.HasWritten() { t.Error("WriteOnCloser must be marked as HasWritten")
Go - Registered: Sun Apr 07 19:28:10 GMT 2024 - Last Modified: Fri Feb 02 11:02:31 GMT 2024 - 5.1K bytes - Viewed (0) -
cmd/metacache-entries_test.go
if !reflect.DeepEqual(want, got) {
Go - Registered: Sun Apr 14 19:28:10 GMT 2024 - Last Modified: Sun Jan 02 17:15:06 GMT 2022 - 31.6K bytes - Viewed (0) -
cmd/bucket-policy-handlers_test.go
// its required to write the policies first before running tests on GetBucketPolicy. for i, testPolicy := range putTestPolicies { // obtain the put bucket policy request body. bucketPolicyStr := fmt.Sprintf(bucketPolicyTemplate, testPolicy.bucketName, testPolicy.bucketName) // initialize HTTP NewRecorder, this records any mutations to response writer inside the handler. recV4 := httptest.NewRecorder()
Go - Registered: Sun Apr 14 19:28:10 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 32.7K bytes - Viewed (0) -
internal/lsync/lrwmutex_test.go
lrwm := NewLRWMutex() // fmt.Println("Getting initial write lock") if !lrwm.GetLock(ctx, "", "", time.Second) { panic("Failed to acquire initial write lock") } go func() { time.Sleep(2 * time.Second) lrwm.Unlock() // fmt.Println("Initial write lock released, waiting...") }() // fmt.Println("Trying to acquire 2nd write lock, waiting...") locked = lrwm.GetLock(ctx, "", "", duration)
Go - Registered: Sun Apr 07 19:28:10 GMT 2024 - Last Modified: Sun Mar 05 04:57:35 GMT 2023 - 7.9K bytes - Viewed (0) -
internal/s3select/message.go
} result := writer.write(newRecordsMessage(writer.payloadBuffer[0:writer.payloadBufferIndex])) if result { atomic.AddInt64(&writer.bytesReturned, int64(writer.payloadBufferIndex)) writer.payloadBufferIndex = 0 } return result } // Finish is the last call to the message writer - it sends any // remaining record payload, then sends statistics and finally the end // message.
Go - Registered: Sun Apr 07 19:28:10 GMT 2024 - Last Modified: Tue Aug 30 15:26:43 GMT 2022 - 15.2K bytes - Viewed (0) -
cmd/bucket-handlers_test.go
// if object upload fails stop the test. if err != nil { t.Fatalf("Error uploading object: <ERROR> %v", err) } // initialize httptest Recorder, this records any mutations to response writer inside the handler. rec := httptest.NewRecorder() // construct HTTP request for DELETE bucket.
Go - Registered: Sun Apr 14 19:28:10 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 39.5K bytes - Viewed (2) -
internal/dsync/drwmutex_test.go
runtime.GOMAXPROCS(gomaxprocs) // Number of active readers + 10000 * number of active writers. var activity int32 cdone := make(chan bool) go writer(resource, numIterations, &activity, cdone) var i int for i = 0; i < numReaders/2; i++ { go reader(resource, numIterations, &activity, cdone) } go writer(resource, numIterations, &activity, cdone) for ; i < numReaders; i++ {
Go - Registered: Sun Apr 14 19:28:10 GMT 2024 - Last Modified: Sat Dec 24 03:49:07 GMT 2022 - 9.7K bytes - Viewed (0) -
cmd/metacache-walk.go
// On success a sorted meta cache stream will be returned. // Metadata has data stripped, if any. func (s *xlStorage) WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writer) (err error) { legacyFS := !(s.fsType == xfs || s.fsType == ext4) s.RLock() legacy := s.formatLegacy s.RUnlock() // Verify if volume is valid and it exists. volumeDir, err := s.getVolDir(opts.Bucket)
Go - Registered: Sun Apr 14 19:28:10 GMT 2024 - Last Modified: Fri Apr 05 15:17:08 GMT 2024 - 12.4K bytes - Viewed (0)