Documentation ¶
Index ¶
- func AsyncJoin(c1 interfaces.ReadWriteCloseReportFlusher, ...) (inCount int64, outCount int64, errors []error)
- func Join(c1 io.ReadWriteCloser, c2 io.ReadWriteCloser) (inCount int64, outCount int64, errors []error)
- func WithAdaptiveEncoding(rwc io.ReadWriteCloser, reportFunc adaptive.ReportFunction, bufSize int, ...) (out interfaces.ReadWriteCloseReportFlusher, recycle func())
- func WithCompression(rwc io.ReadWriteCloser) io.ReadWriteCloser
- func WithCompressionFromPool(rwc io.ReadWriteCloser) (out io.ReadWriteCloser, recycle func())
- func WithEncryption(rwc io.ReadWriteCloser, key []byte) (io.ReadWriteCloser, error)
- func WrapReadWriteCloseReportFlusher(r io.Reader, w interfaces.WriteFlusherReporter, closeFn func() error) interfaces.ReadWriteCloseReportFlusher
- func WrapReadWriteCloseReportFlusher2(rwc io.ReadWriteCloser) interfaces.ReadWriteCloseReportFlusher
- func WrapReadWriteCloser(r io.Reader, w io.Writer, closeFn func() error) io.ReadWriteCloser
- type MockWriteFlusherReporter
- type ReadWriteCloseReportFlusher
- func (rwcrf *ReadWriteCloseReportFlusher) Close() error
- func (rwcrf *ReadWriteCloseReportFlusher) Flush() error
- func (rwcrf *ReadWriteCloseReportFlusher) Read(p []byte) (n int, err error)
- func (rwcrf *ReadWriteCloseReportFlusher) Report(info adaptive.CompressInfo) error
- func (rwcrf *ReadWriteCloseReportFlusher) Write(p []byte) (n int, err error)
- type ReadWriteCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsyncJoin ¶ added in v0.10.0
func AsyncJoin(c1 interfaces.ReadWriteCloseReportFlusher, c2 interfaces.ReadWriteCloseReportFlusher, chanSize int, timeOut int, bufSize int) (inCount int64, outCount int64, errors []error)
func Join ¶
func Join(c1 io.ReadWriteCloser, c2 io.ReadWriteCloser) (inCount int64, outCount int64, errors []error)
Join two io.ReadWriteCloser and do some operations.
func WithAdaptiveEncoding ¶
func WithAdaptiveEncoding(rwc io.ReadWriteCloser, reportFunc adaptive.ReportFunction, bufSize int, compressType uint8) (out interfaces.ReadWriteCloseReportFlusher, recycle func())
func WithCompression ¶
func WithCompression(rwc io.ReadWriteCloser) io.ReadWriteCloser
func WithCompressionFromPool ¶
func WithCompressionFromPool(rwc io.ReadWriteCloser) (out io.ReadWriteCloser, recycle func())
WithCompressionFromPool will get snappy reader and writer from pool. You can recycle the snappy reader and writer by calling the returned recycle function, but it is not necessary.
func WithEncryption ¶
func WithEncryption(rwc io.ReadWriteCloser, key []byte) (io.ReadWriteCloser, error)
func WrapReadWriteCloseReportFlusher ¶ added in v0.10.0
func WrapReadWriteCloseReportFlusher(r io.Reader, w interfaces.WriteFlusherReporter, closeFn func() error) interfaces.ReadWriteCloseReportFlusher
closeFn will be called only once
func WrapReadWriteCloseReportFlusher2 ¶ added in v0.10.0
func WrapReadWriteCloseReportFlusher2(rwc io.ReadWriteCloser) interfaces.ReadWriteCloseReportFlusher
func WrapReadWriteCloser ¶
closeFn will be called only once
Types ¶
type MockWriteFlusherReporter ¶ added in v0.10.0
type MockWriteFlusherReporter struct {
// contains filtered or unexported fields
}
func NewMockWriteFlusherReporter ¶ added in v0.10.0
func NewMockWriteFlusherReporter(w io.Writer) *MockWriteFlusherReporter
func (*MockWriteFlusherReporter) Flush ¶ added in v0.10.0
func (m *MockWriteFlusherReporter) Flush() error
func (*MockWriteFlusherReporter) Report ¶ added in v0.10.0
func (m *MockWriteFlusherReporter) Report(info adaptive.CompressInfo) error
type ReadWriteCloseReportFlusher ¶ added in v0.10.0
type ReadWriteCloseReportFlusher struct {
// contains filtered or unexported fields
}
func (*ReadWriteCloseReportFlusher) Close ¶ added in v0.10.0
func (rwcrf *ReadWriteCloseReportFlusher) Close() error
func (*ReadWriteCloseReportFlusher) Flush ¶ added in v0.10.0
func (rwcrf *ReadWriteCloseReportFlusher) Flush() error
func (*ReadWriteCloseReportFlusher) Read ¶ added in v0.10.0
func (rwcrf *ReadWriteCloseReportFlusher) Read(p []byte) (n int, err error)
func (*ReadWriteCloseReportFlusher) Report ¶ added in v0.10.0
func (rwcrf *ReadWriteCloseReportFlusher) Report(info adaptive.CompressInfo) error
type ReadWriteCloser ¶
type ReadWriteCloser struct {
// contains filtered or unexported fields
}
func (*ReadWriteCloser) Close ¶
func (rwc *ReadWriteCloser) Close() error
Click to show internal directories.
Click to hide internal directories.