Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for WriteCloser (0.43 sec)

  1. internal/ioutil/ioutil.go

    func NewDeadlineWriter(w io.WriteCloser, timeout time.Duration) io.WriteCloser {
    	return &DeadlineWriter{WriteCloser: w, timeout: timeout}
    }
    
    func (w *DeadlineWriter) Write(buf []byte) (int, error) {
    	if w.err != nil {
    		return 0, w.err
    	}
    
    	n, err := WithDeadline[int](context.Background(), w.timeout, func(ctx context.Context) (int, error) {
    		return w.WriteCloser.Write(buf)
    	})
    	w.err = err
    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)
  2. src/archive/zip/register.go

    	"sync"
    )
    
    // A Compressor returns a new compressing writer, writing to w.
    // The WriteCloser's Close method must be used to flush pending data to w.
    // The Compressor itself must be safe to invoke from multiple goroutines
    // simultaneously, but each returned writer will be used only by
    // one goroutine at a time.
    type Compressor func(w io.Writer) (io.WriteCloser, error)
    
    // A Decompressor returns a new decompressing reader, reading from r.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  3. cmd/bitrot-whole.go

    }
    
    func (b *wholeBitrotWriter) Close() error {
    	return nil
    }
    
    // Returns whole-file bitrot writer.
    func newWholeBitrotWriter(disk StorageAPI, volume, filePath string, algo BitrotAlgorithm, shardSize int64) io.WriteCloser {
    	return &wholeBitrotWriter{disk, volume, filePath, shardSize, algo.New()}
    }
    
    // Implementation to verify bitrot for the whole file.
    type wholeBitrotReader struct {
    	disk       StorageAPI
    	volume     string
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Jan 31 02:11:45 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  4. src/archive/zip/example_test.go

    	buf := new(bytes.Buffer)
    
    	// Create a new zip archive.
    	w := zip.NewWriter(buf)
    
    	// Register a custom Deflate compressor.
    	w.RegisterCompressor(zip.Deflate, func(out io.Writer) (io.WriteCloser, error) {
    		return flate.NewWriter(out, flate.BestCompression)
    	})
    
    	// Proceed to add files to w.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 27 00:22:03 GMT 2016
    - 2K bytes
    - Viewed (0)
  5. internal/crypto/sse.go

    // uploaded with the single-part PUT API. The offset and length
    // specify the requested range.
    func DecryptSinglePart(w io.Writer, offset, length int64, key ObjectKey) io.WriteCloser {
    	const PayloadSize = 1 << 16 // DARE 2.0
    	w = ioutil.LimitedWriter(w, offset%PayloadSize, length)
    
    	decWriter, err := sio.DecryptWriter(w, sio.Config{Key: key[:], CipherSuites: fips.DARECiphers()})
    	if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Aug 30 15:26:43 GMT 2022
    - 4.4K bytes
    - Viewed (0)
  6. cmd/bitrot-streaming.go

    	xhttp "github.com/minio/minio/internal/http"
    	"github.com/minio/minio/internal/ioutil"
    )
    
    // Calculates bitrot in chunks and writes the hash into the stream.
    type streamingBitrotWriter struct {
    	iow          io.WriteCloser
    	closeWithErr func(err error) error
    	h            hash.Hash
    	shardSize    int64
    	canClose     *sync.WaitGroup
    }
    
    func (b *streamingBitrotWriter) Write(p []byte) (int, error) {
    	if len(p) == 0 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Jan 31 02:11:45 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  7. src/archive/zip/writer.go

    	if len(b) == 0 {
    		return 0, nil
    	}
    	return 0, errors.New("zip: write to directory")
    }
    
    type fileWriter struct {
    	*header
    	zipw      io.Writer
    	rawCount  *countWriter
    	comp      io.WriteCloser
    	compCount *countWriter
    	crc32     hash.Hash32
    	closed    bool
    }
    
    func (w *fileWriter) Write(p []byte) (int, error) {
    	if w.closed {
    		return 0, errors.New("zip: write to closed file")
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  8. cmd/object-api-datatypes.go

    	UserTags string
    
    	// List of individual parts, maximum size of upto 10,000
    	Parts []ObjectPartInfo `json:"-"`
    
    	// Implements writer and reader used by CopyObject API
    	Writer       io.WriteCloser `json:"-" msg:"-"`
    	Reader       *hash.Reader   `json:"-" msg:"-"`
    	PutObjReader *PutObjReader  `json:"-" msg:"-"`
    
    	metadataOnly bool
    	versionOnly  bool // adds a new version, only used by CopyObject
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 20.8K bytes
    - Viewed (0)
  9. api/go1.txt

    pkg io, type SectionReader struct
    pkg io, type Seeker interface { Seek }
    pkg io, type Seeker interface, Seek(int64, int) (int64, error)
    pkg io, type WriteCloser interface { Close, Write }
    pkg io, type WriteCloser interface, Close() error
    pkg io, type WriteCloser interface, Write([]uint8) (int, error)
    pkg io, type WriteSeeker interface { Seek, Write }
    pkg io, type WriteSeeker interface, Seek(int64, int) (int64, error)
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Aug 14 18:58:28 GMT 2013
    - 1.7M bytes
    - Viewed (1)
  10. api/go1.2.txt

    pkg archive/zip, func RegisterDecompressor(uint16, Decompressor)
    pkg archive/zip, method (*File) DataOffset() (int64, error)
    pkg archive/zip, type Compressor func(io.Writer) (io.WriteCloser, error)
    pkg archive/zip, type Decompressor func(io.Reader) io.ReadCloser
    pkg bufio, method (*Reader) Reset(io.Reader)
    pkg bufio, method (*Writer) Reset(io.Writer)
    pkg compress/flate, method (*Writer) Reset(io.Writer)
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 18 04:36:59 GMT 2013
    - 1.9M bytes
    - Viewed (2)
Back to top