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 common.ReportFunction, bufSize int, ...) (out interfaces.ReadWriteCloseReportFlusher, recycle func())
- func WithAdaptiveEncoding3(rwc io.ReadWriteCloser, compressType uint8) (out interfaces.ReadWriteCloseReportFlusher)
- 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 WrapReadWriteCloseReportFlusher3(r io.Reader, w interfaces.WriteFlusher, closeFn func() error) interfaces.ReadWriteCloseReportFlusher
- func WrapReadWriteCloser(r io.Reader, w io.Writer, closeFn func() error) io.ReadWriteCloser
- type MockWriteFlusherReporter
- type MockWriteFlusherReporter2
- 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 common.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 common.ReportFunction, bufSize int, compressType uint8) (out interfaces.ReadWriteCloseReportFlusher, recycle func())
use normal compression interface.
func WithAdaptiveEncoding3 ¶ added in v0.10.0
func WithAdaptiveEncoding3(rwc io.ReadWriteCloser, compressType uint8) (out interfaces.ReadWriteCloseReportFlusher)
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 WrapReadWriteCloseReportFlusher3 ¶ added in v0.10.0
func WrapReadWriteCloseReportFlusher3(r io.Reader, w interfaces.WriteFlusher, closeFn func() error) 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 common.CompressInfo) error
type MockWriteFlusherReporter2 ¶ added in v0.10.0
type MockWriteFlusherReporter2 struct {
// contains filtered or unexported fields
}
func NewMockWriteFlusherReporter2 ¶ added in v0.10.0
func NewMockWriteFlusherReporter2(w interfaces.WriteFlusher) *MockWriteFlusherReporter2
func (*MockWriteFlusherReporter2) Flush ¶ added in v0.10.0
func (m *MockWriteFlusherReporter2) Flush() error
func (*MockWriteFlusherReporter2) Report ¶ added in v0.10.0
func (m *MockWriteFlusherReporter2) Report(info common.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 common.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.