ioext

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BufferPool = bufferPoolT{
	// contains filtered or unexported fields
}

Functions

func Tee

func Tee(in io.Reader) (main, secondary io.ReadCloser)

func ZipCompressTo

func ZipCompressTo(w io.Writer, files map[string][]byte) error

Types

type AutoFlusher

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

func NewAutoFlusher

func NewAutoFlusher(wf WriteFlusher, flushLatency time.Duration) *AutoFlusher

func NewBufIoAutoFlusher

func NewBufIoAutoFlusher(wf BufIoWriteFlusher, flushLatency time.Duration) *AutoFlusher

func (*AutoFlusher) Stop

func (af *AutoFlusher) Stop()

func (*AutoFlusher) Write

func (af *AutoFlusher) Write(p []byte) (int, error)

type BufIoWriteFlusher

type BufIoWriteFlusher interface {
	io.Writer
	Flush() error
}

type ChunkedData

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

func NewChunkedData

func NewChunkedData(contentType string, data io.Reader) *ChunkedData

func (*ChunkedData) Render

func (c *ChunkedData) Render(w http.ResponseWriter) error

func (*ChunkedData) WriteContentType

func (c *ChunkedData) WriteContentType(w http.ResponseWriter)

type ExtractedFiles

type ExtractedFiles map[string][]byte

func ZipExtract

func ZipExtract(zippedBytes []byte, wanted ...string) (ExtractedFiles, error)

func (ExtractedFiles) Dispose

func (files ExtractedFiles) Dispose()

type TarGzWriter

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

func NewTarGzWriter

func NewTarGzWriter(w io.Writer) *TarGzWriter

func (*TarGzWriter) Close

func (w *TarGzWriter) Close() error

func (*TarGzWriter) Write

func (w *TarGzWriter) Write(filename string, content []byte) error

type WriteFlusher

type WriteFlusher interface {
	io.Writer
	http.Flusher
}

Jump to

Keyboard shortcuts

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