dirwatcher

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

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

Go to latest
Published: Mar 6, 2024 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogPatterns = BuildLogPatterns([]string{"mail.log", "mail.err", "mail.warn", "zimbra.log", "maillog"})
View Source
var ErrEmptyFileList = errors.New(`No valid log files found`)
View Source
var ErrLogFilesNotFound = errors.New("Could not find any matching log files")

Functions

func FindInitialLogTime

func FindInitialLogTime(content DirectoryContent, patterns LogPatterns, format parsertimeutil.TimeFormat) (initialTime time.Time, err error)

Types

type DirectoryContent

type DirectoryContent interface {
	// contains filtered or unexported methods
}

func NewDirectoryContent

func NewDirectoryContent(dir string, format parsertimeutil.TimeFormat) (DirectoryContent, error)

func NewDirectoryContentForRsync

func NewDirectoryContentForRsync(dir string, format parsertimeutil.TimeFormat, patterns LogPatterns) (DirectoryContent, error)

type DirectoryImporter

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

func NewDirectoryImporter

func NewDirectoryImporter(
	content DirectoryContent,
	pub postfix.Publisher,
	announcer announcer.ImportAnnouncer,
	sum postfix.SumPair,
	format parsertimeutil.TimeFormat,
	patterns LogPatterns,
	clock timeutil.Clock,
) DirectoryImporter

func (*DirectoryImporter) ImportOnly

func (importer *DirectoryImporter) ImportOnly() error

func (*DirectoryImporter) Run

func (importer *DirectoryImporter) Run() error

type LogPatterns

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

func BuildLogPatterns

func BuildLogPatterns(patterns []string) LogPatterns

Jump to

Keyboard shortcuts

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