Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for typewriter (0.23 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 Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 27 14:55:36 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  2. 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 Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 21 12:20:54 UTC 2024
    - 6K bytes
    - Viewed (0)
  3. 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 Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  4. 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 Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jun 05 07:51:13 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  5. internal/ringbuffer/ring_buffer_test.go

    	"sync"
    	"testing"
    	"time"
    )
    
    func TestRingBuffer_interface(t *testing.T) {
    	rb := New(1)
    	var _ io.Writer = rb
    	var _ io.Reader = rb
    	// var _ io.StringWriter = rb
    	var _ io.ByteReader = rb
    	var _ io.ByteWriter = rb
    }
    
    func TestRingBuffer_Write(t *testing.T) {
    	rb := New(64)
    
    	// check empty or full
    	if !rb.IsEmpty() {
    		t.Fatalf("expect IsEmpty is true but got false")
    	}
    	if rb.IsFull() {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  6. api/go1.txt

    pkg io, method (*PipeReader) Close() error
    pkg io, method (*PipeReader) CloseWithError(error) error
    pkg io, method (*PipeReader) Read([]uint8) (int, error)
    pkg io, method (*PipeWriter) Close() error
    pkg io, method (*PipeWriter) CloseWithError(error) error
    pkg io, method (*PipeWriter) Write([]uint8) (int, error)
    pkg io, method (*SectionReader) Read([]uint8) (int, error)
    pkg io, method (*SectionReader) ReadAt([]uint8, int64) (int, error)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
  7. api/go1.1.txt

    pkg image, const YCbCrSubsampleRatio444 = 0
    pkg image/draw, const Over = 0
    pkg image/draw, const Src = 1
    pkg image/jpeg, const DefaultQuality = 75
    pkg io, type ByteWriter interface { WriteByte }
    pkg io, type ByteWriter interface, WriteByte(uint8) error
    pkg io, var ErrNoProgress error
    pkg log, const Ldate = 1
    pkg log, const Llongfile = 8
    pkg log, const Lmicroseconds = 4
    pkg log, const Lshortfile = 16
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Mar 31 20:37:15 UTC 2022
    - 2.6M bytes
    - Viewed (0)
Back to top