Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for PipeReader (0.21 sec)

  1. internal/ioutil/wait_pipe.go

    	w.once.Do(func() {
    		w.done()
    	})
    	return err
    }
    
    // PipeReader is similar to io.PipeReader with wait group
    type PipeReader struct {
    	*io.PipeReader
    	wait func()
    }
    
    // CloseWithError close with supplied error the reader end
    func (r *PipeReader) CloseWithError(err error) error {
    	err = r.PipeReader.CloseWithError(err)
    	r.wait()
    	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

    	}
    	return ErrClosedPipe
    }
    
    // A PipeReader is the read half of a pipe.
    type PipeReader struct{ pipe }
    
    // Read implements the standard Read interface:
    // it reads data from the pipe, blocking until a writer
    // arrives or the write end is closed.
    // If the write end is closed with an error, that error is
    // returned as err; otherwise err is EOF.
    func (r *PipeReader) Read(data []byte) (n int, err error) {
    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

    	return &pipe{r1, w2}, &pipe{r2, w1}
    }
    
    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. internal/logger/logrotate.go

    	// 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.
    func (w *Writer) Write(p []byte) (n int, err error) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  5. cmd/sftp-server-driver.go

    	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
    }
    
    func (w *writerAt) WriteAt(b []byte, offset int64) (n int, err error) {
    	w.m.Lock()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 07:51:13 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*LimitedReader).Read", Method, 0},
    		{"(*OffsetWriter).Seek", Method, 20},
    		{"(*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},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  7. 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
    			}
    			if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  8. src/net/http/h2_bundle.go

    	ContextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc)
    }
    
    // pipe is a goroutine-safe io.Reader/io.Writer pair. It's like
    // io.Pipe except there are no PipeReader/PipeWriter halves, and the
    // underlying buffer is an interface. (io.Pipe is always unbuffered)
    type http2pipe struct {
    	mu       sync.Mutex
    	c        sync.Cond       // c.L lazily initialized to &p.mu
    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. api/go1.txt

    pkg io, func Pipe() (*PipeReader, *PipeWriter)
    pkg io, func ReadAtLeast(Reader, []uint8, int) (int, error)
    pkg io, func ReadFull(Reader, []uint8) (int, error)
    pkg io, func TeeReader(Reader, Writer) Reader
    pkg io, func WriteString(Writer, string) (int, error)
    pkg io, method (*LimitedReader) Read([]uint8) (int, error)
    pkg io, method (*PipeReader) Close() error
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top