loglines

package
v0.0.0-...-4ffc68c Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DedupAB

func DedupAB(a, b []*ProcessedLine) ([]*ProcessedLine, []*ProcessedLine)

func DedupLineSlices

func DedupLineSlices(lineSlices []*LineSlice) (*LineSlice, *LineSlice)

func WriteOverlap

func WriteOverlap(lines []*ProcessedLine, name string) error

Types

type Dump

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

type GenerationDumper

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

func NewGenerationDumper

func NewGenerationDumper(dir string, keepLogs bool) *GenerationDumper

func (*GenerationDumper) DumpLines

func (dump *GenerationDumper) DumpLines(ls *LineSlice, numberInGen int)

func (*GenerationDumper) Start

func (dump *GenerationDumper) Start()

func (*GenerationDumper) Stop

func (dump *GenerationDumper) Stop()

type GenerationalLockedTime

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

func NewGenerationalLockedTime

func NewGenerationalLockedTime(initialTime time.Time) GenerationalLockedTime

func (*GenerationalLockedTime) Generation

func (lt *GenerationalLockedTime) Generation() uint32

func (*GenerationalLockedTime) Time

func (lt *GenerationalLockedTime) Time() time.Time

func (*GenerationalLockedTime) Update

func (lt *GenerationalLockedTime) Update(update time.Time)

type Generations

type Generations struct {
	Store  map[uint32][]*LineSlice
	Dumper *GenerationDumper
	Latest uint32
	Oldest uint32
}

func (*Generations) Add

func (gens *Generations) Add(lineSlice *LineSlice)

func (*Generations) Flush

func (gens *Generations) Flush() *LineSlice

func (*Generations) FlushAll

func (gens *Generations) FlushAll() *LineSlice

func (*Generations) ShouldFlush

func (gens *Generations) ShouldFlush() bool

type LineSlice

type LineSlice struct {
	Lines      []*ProcessedLine
	Generation uint32
	// contains filtered or unexported fields
}

func MakeSliceFromLines

func MakeSliceFromLines(lines []*ProcessedLine, generation uint32) *LineSlice

type ProcessedLine

type ProcessedLine struct {
	Timestamp  time.Time
	Full       string
	Content    string
	Generation uint32
}

func MakeNewCombinedSlice

func MakeNewCombinedSlice(x, y []*ProcessedLine) []*ProcessedLine

func ProcessLine

func ProcessLine(line string) (*ProcessedLine, error)

Jump to

Keyboard shortcuts

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