category

package
v0.0.0-...-845418e Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const CHUNKED_CATEGORY_READ_DIR_BUFFER_SIZE = 1000
View Source
const CHUNKED_EVENTS_BUFFER_SIZE = 1000
View Source
const DATE_FORMAT = "2006-01-02"
View Source
const EXTENSION_GZIP = ".gz"
View Source
const WRITE_BUFFER_SIZE = 1 << 20 // 1mb

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkedWriter

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

func NewChunkedWriter

func NewChunkedWriter(baseDir, cname, cpath string, settings Settings, trafficManager *traffic.Manager) *ChunkedWriter

func (*ChunkedWriter) Close

func (w *ChunkedWriter) Close() error

func (*ChunkedWriter) Flush

func (w *ChunkedWriter) Flush() error

func (*ChunkedWriter) Prepare

func (w *ChunkedWriter) Prepare() error

func (*ChunkedWriter) Rotate

func (w *ChunkedWriter) Rotate() error

func (*ChunkedWriter) Write

func (w *ChunkedWriter) Write(event *Event) (bool, error)

type Event

type Event struct {
	*lsd.RequestNewEventsEventT
	AnswerCh chan *lsd.ResponseOffsetsOffsetT
}

type PlainWriter

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

func NewPlainWriter

func NewPlainWriter(cname, cpath string, settings Settings, trafficManager *traffic.Manager) *PlainWriter

func (*PlainWriter) Close

func (w *PlainWriter) Close() error

func (*PlainWriter) Flush

func (w *PlainWriter) Flush() error

func (*PlainWriter) Prepare

func (w *PlainWriter) Prepare() error

func (*PlainWriter) Rotate

func (w *PlainWriter) Rotate() error

func (*PlainWriter) Write

func (w *PlainWriter) Write(event *Event) (bool, error)

type Settings

type Settings struct {
	Mode               lsd.LsdConfigServerConfigTWriteMode
	Patterns           []*regexp.Regexp
	MaxFileSize        uint64
	FileRotateInterval uint64
	Gzip               bool
	GzipParallel       uint64
}

type Writer

type Writer interface {
	Prepare() error
	Write(*Event) (bool, error) // (rotated after write, error)
	Rotate() error
	Flush() error
	Close() error
}

Jump to

Keyboard shortcuts

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