Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 21 for closeWithError (0.22 sec)

  1. cmd/metacache-set.go

    			go func() {
    				werr := er.getObjectWithFileInfo(ctx, minioMetaBucket, o.objectPath(partN), 0,
    					fi.Size, pw, fi, metaArr, onlineDisks)
    				pw.CloseWithError(werr)
    			}()
    
    			tmp := newMetacacheReader(pr)
    			e, err := tmp.filter(o)
    			pr.CloseWithError(err)
    			tmp.Close()
    			entries.o = append(entries.o, e.o...)
    			if o.Limit > 0 && entries.len() > o.Limit {
    				entries.truncate(o.Limit)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 22:18:44 UTC 2024
    - 30.4K bytes
    - Viewed (0)
  2. internal/logger/logrotate.go

    }
    
    // Close closes the writer.
    // Any accepted writes will be flushed. Any new writes will be rejected.
    // Once Close() exits, files are synchronized to disk.
    func (w *Writer) Close() error {
    	w.pw.CloseWithError(nil)
    
    	if w.f != nil {
    		if err := w.closeCurrentFile(); err != nil {
    			return err
    		}
    	}
    
    	return nil
    }
    
    var stdErrEnc = json.NewEncoder(os.Stderr)
    
    func (w *Writer) listen() {
    	for {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  3. cmd/object-api-utils.go

    		defer xioutil.SafeClose(indexCh)
    		cn, err := io.Copy(comp, r)
    		if err != nil {
    			comp.Close()
    			pw.CloseWithError(err)
    			return
    		}
    		if on > 0 && on != cn {
    			// if client didn't sent all data
    			// from the client verify here.
    			comp.Close()
    			pw.CloseWithError(IncompleteBody{})
    			return
    		}
    		// Close the stream.
    		// If more than compMinIndexSize was written, generate index.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 11 03:13:30 UTC 2024
    - 36.3K bytes
    - Viewed (0)
  4. cmd/storage-rest-client.go

    	pr, pw := io.Pipe()
    	go func() {
    		pw.CloseWithError(waitForHTTPStream(respBody, ioutil.NewDeadlineWriter(pw, globalDriveConfig.GetMaxTimeout())))
    	}()
    	mr := msgp.NewReader(pr)
    	defer readMsgpReaderPoolPut(mr)
    	for {
    		var file ReadMultipleResp
    		if err := file.DecodeMsg(mr); err != nil {
    			if errors.Is(err, io.EOF) {
    				err = nil
    			}
    			pr.CloseWithError(err)
    			return toStorageErr(err)
    		}
    		select {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 27.4K bytes
    - Viewed (0)
  5. src/net/rpc/jsonrpc/all_test.go

    	if strings.Contains(out.String(), valueText) {
    		t.Errorf("Response contains both an error and value: %s", &out)
    	}
    }
    
    func TestUnexpectedError(t *testing.T) {
    	cli, srv := myPipe()
    	go cli.PipeWriter.CloseWithError(errors.New("unexpected error!")) // reader will get this error
    	ServeConn(srv)                                                    // must return, not loop
    }
    
    // Copied from package net.
    func myPipe() (*pipe, *pipe) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 01:09:53 UTC 2022
    - 7.8K bytes
    - Viewed (0)
  6. src/net/http/fs.go

    				part, err := mw.CreatePart(ra.mimeHeader(ctype, size))
    				if err != nil {
    					pw.CloseWithError(err)
    					return
    				}
    				if _, err := content.Seek(ra.start, io.SeekStart); err != nil {
    					pw.CloseWithError(err)
    					return
    				}
    				if _, err := io.CopyN(part, content, ra.length); err != nil {
    					pw.CloseWithError(err)
    					return
    				}
    			}
    			mw.Close()
    			pw.Close()
    		}()
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 17:06:47 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  7. cmd/erasure-object.go

    		unlockOnDefer = fi.InlineData()
    	}
    
    	pr, pw := xioutil.WaitPipe()
    	go func() {
    		pw.CloseWithError(er.getObjectWithFileInfo(ctx, bucket, object, off, length, pw, fi, metaArr, onlineDisks))
    	}()
    
    	// Cleanup function to cause the go routine above to exit, in
    	// case of incomplete read.
    	pipeCloser := func() {
    		pr.CloseWithError(nil)
    	}
    
    	if !unlockOnDefer {
    		return fn(pr, h, pipeCloser, nsUnlocker)
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 78.6K bytes
    - Viewed (0)
  8. src/net/http/h2_bundle.go

    func (p *http2pipe) BreakWithError(err error) { p.closeWithError(&p.breakErr, err, nil) }
    
    // closeWithErrorAndCode is like CloseWithError but also sets some code to run
    // in the caller's goroutine before returning the error.
    func (p *http2pipe) closeWithErrorAndCode(err error, fn func()) { p.closeWithError(&p.err, err, fn) }
    
    func (p *http2pipe) closeWithError(dst *error, err error, fn func()) {
    	if err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 364.1K bytes
    - Viewed (0)
  9. cmd/bucket-replication.go

    			mw := msgp.NewWriter(w)
    			n, err := mw.Write(data[:])
    			if err != nil {
    				w.CloseWithError(err)
    				return
    			}
    			if n != len(data) {
    				w.CloseWithError(io.ErrShortWrite)
    				return
    			}
    			err = v.EncodeMsg(mw)
    			mw.Flush()
    			w.CloseWithError(err)
    		}()
    		return r
    	}
    
    	globalLocalDrivesMu.RLock()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 06:56:12 UTC 2024
    - 114.4K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*OffsetWriter).Write", Method, 20},
    		{"(*OffsetWriter).WriteAt", Method, 20},
    		{"(*PipeReader).Close", Method, 0},
    		{"(*PipeReader).CloseWithError", Method, 0},
    		{"(*PipeReader).Read", Method, 0},
    		{"(*PipeWriter).Close", Method, 0},
    		{"(*PipeWriter).CloseWithError", Method, 0},
    		{"(*PipeWriter).Write", Method, 0},
    		{"(*SectionReader).Outer", Method, 22},
    		{"(*SectionReader).Read", Method, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top