rolling

package
v0.0.0-...-7429660 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MonthlyRolling  RollingFormat = "200601"
	DailyRolling                  = "20060102"
	HourlyRolling                 = "2006010215"
	MinutelyRolling               = "200601021504"
	SecondlyRolling               = "20060102150405"
)

Variables

View Source
var ErrBuffer = errors.New("buffer exceeds the limit")
View Source
var ErrClosedRollingFile = errors.New("rolling file is closed")

Functions

This section is empty.

Types

type RollingFile

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

func NewRollingFile

func NewRollingFile(basePath string, rolling RollingFormat) (*RollingFile, error)

func (*RollingFile) Close

func (r *RollingFile) Close() error

func (*RollingFile) SetRolling

func (r *RollingFile) SetRolling(fmt RollingFormat)

func (*RollingFile) Sync

func (r *RollingFile) Sync() error

func (*RollingFile) Write

func (r *RollingFile) Write(b []byte) (n int, err error)

type RollingFormat

type RollingFormat string

Jump to

Keyboard shortcuts

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