Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 94 for Writer (0.19 sec)

  1. 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 21 19:28:08 GMT 2024
    - Last Modified: Wed Jan 31 02:11:45 GMT 2024
    - 3K bytes
    - Viewed (0)
  2. 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 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 11:26:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  3. 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 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 02 11:02:31 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  4. 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 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 32.7K bytes
    - Viewed (0)
  5. 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 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 39.5K bytes
    - Viewed (2)
  6. 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 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  7. cmd/bucket-replication-utils_gen.go

    // EncodeMsg implements msgp.Encodable
    func (z *BucketReplicationResyncStatus) EncodeMsg(en *msgp.Writer) (err error) {
    	// map header, size 4
    	// write "v"
    	err = en.Append(0x84, 0xa1, 0x76)
    	if err != nil {
    		return
    	}
    	err = en.WriteInt(z.Version)
    	if err != nil {
    		err = msgp.WrapError(err, "Version")
    		return
    	}
    	// write "brs"
    	err = en.Append(0xa3, 0x62, 0x72, 0x73)
    	if err != nil {
    		return
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Mar 21 17:21:35 GMT 2024
    - 61.1K bytes
    - Viewed (0)
  8. cmd/object-api-interface.go

    // tests are adjusted to use GetObjectNInfo this function can be removed.
    func GetObject(ctx context.Context, api ObjectLayer, bucket, object string, startOffset int64, length int64, writer io.Writer, etag string, opts ObjectOptions) (err error) {
    	var header http.Header
    	if etag != "" {
    		header.Set("ETag", etag)
    	}
    	Range := &HTTPRangeSpec{Start: startOffset, End: startOffset + length}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Apr 20 09:05:54 GMT 2024
    - 16.9K bytes
    - Viewed (0)
  9. docs/debugging/inspect/decrypt-v2.go

    package main
    
    import (
    	"errors"
    	"fmt"
    	"io"
    	"os"
    
    	"github.com/minio/madmin-go/v3/estream"
    )
    
    type keepFileErr struct {
    	error
    }
    
    func extractInspectV2(pk []byte, r io.Reader, w io.Writer, okMsg string) error {
    	privKey, err := bytesToPrivateKey(pk)
    	if err != nil {
    		return fmt.Errorf("decoding key returned: %w", err)
    	}
    
    	sr, err := estream.NewReader(r)
    	if err != nil {
    		return err
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 11 21:22:47 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  10. cmd/batch-rotate_gen.go

    // EncodeMsg implements msgp.Encodable
    func (z BatchJobKeyRotateEncryption) EncodeMsg(en *msgp.Writer) (err error) {
    	// map header, size 3
    	// write "Type"
    	err = en.Append(0x83, 0xa4, 0x54, 0x79, 0x70, 0x65)
    	if err != nil {
    		return
    	}
    	err = en.WriteString(string(z.Type))
    	if err != nil {
    		err = msgp.WrapError(err, "Type")
    		return
    	}
    	// write "Key"
    	err = en.Append(0xa3, 0x4b, 0x65, 0x79)
    	if err != nil {
    		return
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 02 10:51:33 GMT 2023
    - 27.1K bytes
    - Viewed (0)
Back to top