resolve

package
v0.1.34 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorSourceType = errors.New("unsupported source type")
)

Functions

func NewLogFactory

func NewLogFactory(data []byte, opts ...OptT) (format.FactoryI, int64, error)

func WithCustomFmt

func WithCustomFmt(regex, fmt string) func(*optsT)

func WithStampRegex

func WithStampRegex(stampRegex ...FmtSpec) func(*optsT)

func WithTimestampTries

func WithTimestampTries(tries int) func(*optsT)

func WithWindow

func WithWindow(window int64) func(*optsT)

Types

type DataSources

type DataSources = datasrc.DataSources

type FmtSpec

type FmtSpec struct {
	Pattern string
	Format  TimestampFmt
}

type LogData

type LogData struct {
	Logs []LogSrcI
	// contains filtered or unexported fields
}

LogData is a collection of log src It implements the DataSrc interface

func NewLogData

func NewLogData(logs []LogSrcI, name, srcType string) *LogData

func PipeEval added in v0.1.13

func PipeEval(data []byte, opts ...OptT) ([]*LogData, error)

func PipeStdin

func PipeStdin(opts ...OptT) ([]*LogData, error)

func Resolve

func Resolve(dss *DataSources, opts ...OptT) []*LogData

func (*LogData) Close

func (ld *LogData) Close() error

func (*LogData) Meta

func (ld *LogData) Meta() map[string]string

func (*LogData) Name

func (ld *LogData) Name() string

func (*LogData) Size

func (ld *LogData) Size() int64

func (*LogData) SrcType

func (ld *LogData) SrcType() string

func (*LogData) Type

func (ld *LogData) Type() string

type LogSrcI

type LogSrcI interface {
	io.ReadCloser
	Size() int64
	Name() string
	Fold() bool
	Window() int64
	Parser() format.ParserI
}

type OptT

type OptT func(*optsT)

type PipeRdrT

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

func (*PipeRdrT) Close

func (p *PipeRdrT) Close() error

func (*PipeRdrT) Fold

func (p *PipeRdrT) Fold() bool

func (*PipeRdrT) Name

func (p *PipeRdrT) Name() string

func (*PipeRdrT) Parser

func (p *PipeRdrT) Parser() format.ParserI

func (*PipeRdrT) Read

func (p *PipeRdrT) Read(b []byte) (int, error)

func (*PipeRdrT) Size

func (p *PipeRdrT) Size() int64

func (*PipeRdrT) Window

func (p *PipeRdrT) Window() int64

type TimestampFmt

type TimestampFmt = timez.TimestampFmt

Jump to

Keyboard shortcuts

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