sized

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

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

Writer wraps an io.WriteCloser and adds a size limit. when the size limit is reached, the io.WriteCloser is closed and a new one is created using the open function.

func NewWriter

func NewWriter(ctx context.Context, n int, saveCommandChan chan int, limit int64,
	open func(context.Context) (io.WriteCloser, error)) (*Writer, error)

NewWriter creates a new Writer with a size limit. limit must be greater than 0.

func (*Writer) Close

func (f *Writer) Close() error

func (*Writer) Write

func (f *Writer) 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