countwriter

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGzipPipe

func NewGzipPipe() (CountWriteCloser, CountReadCloser)

NewGzipPipe - returns wrapped PipeWriter into (GzipWriter && Writer) and PipeReader into (Reader)

Types

type CountReadCloser

type CountReadCloser interface {
	GetCount() int64
	io.ReadCloser
}

type CountWriteCloser

type CountWriteCloser interface {
	GetCount() int64
	io.WriteCloser
}

type GzipWriter

type GzipWriter struct {
	// contains filtered or unexported fields
}

func NewGzipWriter

func NewGzipWriter(w io.WriteCloser) *GzipWriter

func (*GzipWriter) Close

func (gw *GzipWriter) Close() error

Close - closing method with gz buffer flushing

func (*GzipWriter) Write

func (gw *GzipWriter) Write(p []byte) (int, error)

type Reader

type Reader struct {
	Count int64
	// contains filtered or unexported fields
}

func NewReader

func NewReader(r io.ReadCloser) *Reader

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) GetCount

func (r *Reader) GetCount() int64

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

type Writer

type Writer struct {
	Count int64
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(w io.WriteCloser) *Writer

func (*Writer) Close

func (cw *Writer) Close() error

func (*Writer) GetCount

func (cw *Writer) GetCount() int64

func (*Writer) Write

func (cw *Writer) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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