file

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(path string) proto.Adapter

func NewFile

func NewFile(path string, backups int, fileSize int64) proto.Adapter

NewFile creates a file adapter.

Params

path     -- the log file path, the parent directory is created if not exist.
backups  -- the max count of the backup files.
fileSize -- the max size of a single log file in bytes, the file is
            rotated when it reached the size.

Types

type Adapter

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

func (*Adapter) Close

func (a *Adapter) Close()

func (*Adapter) Put

func (a *Adapter) Put(p *proto.Proto)

Put puts a log protocol to the log queue.

Jump to

Keyboard shortcuts

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