ulog

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KB = 1024
	MB = 1024 * 1024
	GB = 1024 * 1024 * 1024
)

Variables

View Source
var (
	ErrLimit   = errors.New("The length of the written data exceeds the limit")
	ErrNotDoIt = errors.New("Don't do it")
)

Functions

This section is empty.

Types

type CompressType

type CompressType int
const (
	Gzip CompressType = iota
	NotCompress
)

type File

type File struct {
	sync.RWMutex
	sync.WaitGroup
	// contains filtered or unexported fields
}

func NewFile

func NewFile(prefix string, dir string, compress CompressType, maxSize, maxArchive int) (f *File)

func (*File) Close

func (f *File) Close()

func (*File) Write

func (f *File) Write(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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