multitail

package module
v0.0.0-...-0b6acc4 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-multitail

go-multitail is a Go package to continuously consume lines from multiple files similar to tail -f.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ReadFromHead bool
}

type Line

type Line struct {
	Filename string    // The name of the file from which this line originates
	Text     string    // The contents of the file
	Num      int       // The line number
	SeekInfo SeekInfo  // SeekInfo
	Time     time.Time // Present time
	Err      error     // Error from tail
}

type MultiTail

type MultiTail struct {
	Lines chan *Line
	Config
}

func OpenDirectory

func OpenDirectory(path string, config Config) (*MultiTail, error)

OpenDirectory returns a Multitail for all files in the specified directory path

func OpenGlob

func OpenGlob(glob string, config Config) (*MultiTail, error)

OpenGlob returns a Multitail for all files matching a specified glob pattern. See filepath.Glob for glob pattern syntax.

type SeekInfo

type SeekInfo struct {
	Offset int64
	Whence int
}

Jump to

Keyboard shortcuts

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