lazy

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 4 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 creates a writer only on Write operation.

func NewWriter

func NewWriter(ctx context.Context,
	n int,
	open func(context.Context, string, *atomic.Uint64) (io.WriteCloser, error),
) (*Writer, error)

NewWriter creates a new lazy Writer.

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