tail

package
v0.0.0-...-631d120 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrScatteredFiles = errors.New("all Tailable files must be in the same directory")

Functions

func Files

func Files(ctx context.Context, files []Tailable) (<-chan *Line, <-chan error, error)

Unstable, beta

All files must be in the same directory. Channels will be closed after file is deleted //TODO:

func New

func New(ctx context.Context, name string, offset int64, whence int) (<-chan *Line, <-chan error, error)

Unstable, beta

Types

type Line

type Line struct {
	Filename   *string
	Bytes      []byte
	EndOffset  int64 // io.SeekStart
	ReachedEOF bool
}

type Tailable

type Tailable struct {
	Name string
	// os.Seek() on first open:
	Offset int64
	Whence int
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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