writer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultWriterLatency = 500 * time.Millisecond
	DefaultWriterSize    = 4096
)

Functions

This section is empty.

Types

type LatencyWriter

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

maxLatencyWriter from httputil

func (*LatencyWriter) Stop

func (m *LatencyWriter) Stop()

func (*LatencyWriter) Write

func (m *LatencyWriter) Write(p []byte) (n int, err error)

type WriteFlusher

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

type Writer

type Writer interface {
	Write([]byte) (int, error)
	Stop()
}

func NewLatencyWriter

func NewLatencyWriter(wf WriteFlusher, latency time.Duration) Writer

func NewWriter

func NewWriter(wf WriteFlusher, latency time.Duration) Writer

Jump to

Keyboard shortcuts

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