search

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0, MIT, MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IterWithAccessTime

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

func NewIter

func NewIter(iter *Sequence, search, level string) *IterWithAccessTime

func (*IterWithAccessTime) Close

func (i *IterWithAccessTime) Close() error

func (*IterWithAccessTime) GetAccessTime

func (i *IterWithAccessTime) GetAccessTime() time.Time

func (*IterWithAccessTime) Next

func (i *IterWithAccessTime) Next() (item.Item, error)

type Searcher

type Searcher interface {
	Search(dir string, begin, end time.Time, level, text, token string) (iterator.Iterator, string, error)
}

func NewSearcher

func NewSearcher() Searcher

type Sequence

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

func NewSequence

func NewSequence(src string, begin, end time.Time) (*Sequence, error)

SearchLog open all log files in the directory, analyze each log in each file by merge sort (from old to new by timestamp), return the constructed LogIter object and provide the Next function for external call.

func (*Sequence) Add

func (s *Sequence) Add(iter iterator.IteratorWithPeek)

func (*Sequence) Close

func (s *Sequence) Close() error

func (*Sequence) Next

func (s *Sequence) Next() (item.Item, error)

choose the log with earlier timestamp

func (*Sequence) Remove

func (s *Sequence) Remove(index int)

Jump to

Keyboard shortcuts

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