bufwriter

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT 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
}

func New

func New(path string) (*Writer, error)

func NewWithWriter

func NewWithWriter(writer *os.File) (*Writer, error)

func (*Writer) Close

func (w *Writer) Close() error

Close 关闭写入器

func (*Writer) Flush

func (w *Writer) Flush() error

Flush 手动刷新缓冲区

func (*Writer) GetIntervals

func (w *Writer) GetIntervals() (flushPower, syncPower uint, flushInterval, syncInterval int)

GetIntervals 获取当前间隔设置(用于调试)

func (*Writer) SetFlushInterval

func (w *Writer) SetFlushInterval(power uint)

SetFlushInterval 设置刷新间隔的指数

func (*Writer) SetSyncInterval

func (w *Writer) SetSyncInterval(power uint)

SetSyncInterval 设置同步间隔的指数

func (*Writer) Write

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

写入数据

Jump to

Keyboard shortcuts

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