io

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 218

Documentation

Index

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

func WrapReadWriteCloser(r io.Reader, w io.Writer, closeFn func() error) io.ReadWriteCloser

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

func (*ReadWriteCloser) Read

func (rwc *ReadWriteCloser) Read(p []byte) (n int, err error)

func (*ReadWriteCloser) Write

func (rwc *ReadWriteCloser) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL