filewriter

package
v0.76.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package filewriter provides a rolling file writer.

Index

Constants

View Source
const (
	RollingNameModePostfix = iota
	RollingNameModePrefix
)

RollingNameMode values

Variables

This section is empty.

Functions

This section is empty.

Types

type RollingFileWriterSize

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

RollingFileWriterSize performs roll when file exceeds a specified limit.

func NewRollingFileWriterSize

func NewRollingFileWriterSize(fpath string, maxSize int64, maxRolls int, namemode RollingNameMode) (*RollingFileWriterSize, error)

NewRollingFileWriterSize creates a new RollingFileWriterSize.

func (RollingFileWriterSize) Close

func (rw RollingFileWriterSize) Close() error

func (*RollingFileWriterSize) String

func (rws *RollingFileWriterSize) String() string

func (RollingFileWriterSize) Write

func (rw RollingFileWriterSize) Write(bytes []byte) (n int, err error)

type RollingNameMode

type RollingNameMode uint8

RollingNameMode is the type of the rolled file naming mode: prefix, postfix, etc.

Jump to

Keyboard shortcuts

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