Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for PipeWriter (0.21 sec)

  1. internal/ioutil/wait_pipe.go

    package ioutil
    
    import (
    	"io"
    	"sync"
    )
    
    // PipeWriter is similar to io.PipeWriter with wait group
    type PipeWriter struct {
    	*io.PipeWriter
    	once sync.Once
    	done func()
    }
    
    // CloseWithError close with supplied error the writer end.
    func (w *PipeWriter) CloseWithError(err error) error {
    	err = w.PipeWriter.CloseWithError(err)
    	w.once.Do(func() {
    		w.done()
    	})
    	return err
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 27 14:55:36 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  2. src/io/pipe.go

    // CloseWithError never overwrites the previous error if it exists
    // and always returns nil.
    func (r *PipeReader) CloseWithError(err error) error {
    	return r.pipe.closeRead(err)
    }
    
    // A PipeWriter is the write half of a pipe.
    type PipeWriter struct{ r PipeReader }
    
    // Write implements the standard Write interface:
    // it writes data to the pipe, blocking until one or more readers
    // have consumed all the data or the read end is closed.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:34:35 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  3. src/net/rpc/jsonrpc/all_test.go

    }
    
    type pipe struct {
    	*io.PipeReader
    	*io.PipeWriter
    }
    
    type pipeAddr int
    
    func (pipeAddr) Network() string {
    	return "pipe"
    }
    
    func (pipeAddr) String() string {
    	return "pipe"
    }
    
    func (p *pipe) Close() error {
    	err := p.PipeReader.Close()
    	err1 := p.PipeWriter.Close()
    	if err == nil {
    		err = err1
    	}
    	return err
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 01:09:53 UTC 2022
    - 7.8K bytes
    - Viewed (0)
  4. src/net/http/filetransport.go

    // on ch.
    type populateResponse struct {
    	res          *Response
    	ch           chan *Response
    	wroteHeader  bool
    	hasContent   bool
    	sentResponse bool
    	pw           *io.PipeWriter
    }
    
    func (pr *populateResponse) finish() {
    	if !pr.wroteHeader {
    		pr.WriteHeader(500)
    	}
    	if !pr.sentResponse {
    		pr.sendResponse()
    	}
    	pr.pw.Close()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  5. cmd/bitrot-streaming.go

    	// This will also flush the ring buffer if used.
    	err := b.iow.Close()
    
    	// Wait for all data to be written before returning else it causes race conditions.
    	// Race condition is because of io.PipeWriter implementation. i.e consider the following
    	// sequent of operations:
    	// 1) pipe.Write()
    	// 2) pipe.Close()
    	// Now pipe.Close() can return before the data is read on the other end of the pipe and written to the disk
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  6. internal/logger/logrotate.go

    	opts Options
    
    	// f is the currently open file used for appends.
    	// Writes to f are only synchronized once Close() is called,
    	// or when files are being rotated.
    	f *os.File
    
    	pw *xioutil.PipeWriter
    	pr *xioutil.PipeReader
    }
    
    // Write writes p into the current file, rotating if necessary.
    // Write is non-blocking, if the writer's queue is not full.
    // Write is blocking otherwise.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  7. src/net/http/fcgi/child.go

    	"net/http/cgi"
    	"os"
    	"strings"
    	"time"
    )
    
    // request holds the state for an in-progress request. As soon as it's complete,
    // it's converted to an http.Request.
    type request struct {
    	pw        *io.PipeWriter
    	reqId     uint16
    	params    map[string]string
    	buf       [1024]byte
    	rawParams []byte
    	keepConn  bool
    }
    
    // envVarsContextKey uniquely identifies a mapping of CGI
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  8. cmd/sftp-server-driver.go

    		err = w.err
    	default:
    		err = w.w.Close()
    	}
    	for i := range w.buffer {
    		delete(w.buffer, i)
    	}
    	w.wg.Wait()
    	return err
    }
    
    type writerAt struct {
    	w      *io.PipeWriter
    	r      *io.PipeReader
    	wg     *sync.WaitGroup
    	buffer map[int64][]byte
    	err    error
    
    	nextOffset int64
    	m          sync.Mutex
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 07:51:13 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*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},
    		{"(*SectionReader).ReadAt", 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)
  10. src/net/http/transport_test.go

    	const numReqs = 5
    	reqBody := func(n int) string { return fmt.Sprintf("request body %d", n) }
    	reqID := func(n int) string { return fmt.Sprintf("REQ-ID-%d", n) }
    
    	send100Response := func(w *io.PipeWriter, r *io.PipeReader) {
    		defer w.Close()
    		defer r.Close()
    		br := bufio.NewReader(r)
    		n := 0
    		for {
    			n++
    			req, err := ReadRequest(br)
    			if err == io.EOF {
    				return
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
Back to top