Documentation ¶
Index ¶
- func Join(c1 io.ReadWriteCloser, c2 io.ReadWriteCloser) (inCount int64, outCount int64, errors []error)
- 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 WrapReadWriteCloser(r io.Reader, w io.Writer, closeFn func() error) io.ReadWriteCloser
- type ReadWriteCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 WithCompression ¶
func WithCompression(rwc io.ReadWriteCloser) io.ReadWriteCloser
func WithCompressionFromPool ¶ added in v0.3.0
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 WrapReadWriteCloser ¶
closeFn will be called only once
Types ¶
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.