fs

package
v1.1.21 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B = 1 << (10 * iota)
	KB
	MB
	GB
	TB
	PB
)
View Source
const (
	DefaultFileMaxDelta = 100
	DefaultBufferSize   = 512 * KB
	DefaultFileMaxSize  = 256 * MB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSysOut

type FileSysOut struct {
	sync.Mutex

	Bucket chan *bytes.Buffer
	// contains filtered or unexported fields
}

func NewFs

func NewFs(opts ...Options) *FileSysOut

func (*FileSysOut) Async

func (l *FileSysOut) Async() bool

func (*FileSysOut) Close

func (l *FileSysOut) Close()

func (*FileSysOut) FileModel

func (l *FileSysOut) FileModel() os.FileMode

func (*FileSysOut) Filename

func (l *FileSysOut) Filename() string

func (*FileSysOut) Init

func (l *FileSysOut) Init(string)

func (*FileSysOut) Interval

func (l *FileSysOut) Interval() time.Duration

func (*FileSysOut) Level

func (l *FileSysOut) Level() common.Level
func (l *FileSysOut) Link() string

func (*FileSysOut) MaxBucketSize

func (l *FileSysOut) MaxBucketSize() int

func (*FileSysOut) MaxBufferSize

func (l *FileSysOut) MaxBufferSize() int

func (*FileSysOut) Name

func (l *FileSysOut) Name() string

func (*FileSysOut) Out

func (l *FileSysOut) Out(level common.Level, b *bytes.Buffer)

func (*FileSysOut) Path

func (l *FileSysOut) Path() string

func (*FileSysOut) Poller

func (l *FileSysOut) Poller()

func (*FileSysOut) Prefix

func (l *FileSysOut) Prefix() string

func (*FileSysOut) Rotate

func (l *FileSysOut) Rotate() bool

func (*FileSysOut) SetLevel

func (l *FileSysOut) SetLevel(level common.Level)

func (*FileSysOut) String

func (l *FileSysOut) String() string

func (*FileSysOut) Zone

func (l *FileSysOut) Zone() *time.Location

type Option

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

type Options

type Options func(*Option)

func Async

func Async() Options

func FileModel

func FileModel(perm int) Options

func Interval

func Interval(interval time.Duration) Options
func Link(link string) Options

func MaxBufferSize

func MaxBufferSize(maxBufferSize int) Options

func MaxFileSize

func MaxFileSize(maxFileSize int) Options

func Name

func Name(name string) Options

func Path

func Path(p string) Options

func Prefix

func Prefix(prefix string) Options

func Rotate

func Rotate() Options

func Zone

func Zone(zone *time.Location) Options

Jump to

Keyboard shortcuts

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