writer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWriter

type FileWriter struct {
	FilenameFunc func(*FileWriter) string
	// contains filtered or unexported fields
}

FileWriter 文件写入结构体

func NewFileWriter

func NewFileWriter(opts ...Option) (*FileWriter, error)

NewFileWriter 实例化FileWriter, 支持大文件分割

func (*FileWriter) Write

func (p *FileWriter) Write(data []byte) (n int, err error)

Write 写入方法

type Option

type Option func(*Options)

Option set options

func WithBufferSize added in v0.1.9

func WithBufferSize(n uint) Option

WithBufferSize set loki buffer size

func WithCap

func WithCap(n uint) Option

WithCap set cap

func WithLokiEndpoint added in v0.1.9

func WithLokiEndpoint(s string) Option

WithLokiEndpoint set loki endpoint

func WithLokiInterval added in v0.1.9

func WithLokiInterval(d time.Duration) Option

WithLokiInterval set loki interval

func WithLokiLabels added in v0.1.9

func WithLokiLabels(m map[string]string) Option

WithLokiLabels set loki labels

func WithPath

func WithPath(s string) Option

WithPath set path

func WithSuffix

func WithSuffix(s string) Option

WithSuffix set suffix

type Options

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

Options 可配置参数

Jump to

Keyboard shortcuts

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