tailer

package
v0.0.0-...-5e0759b Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package tailer provides a class that is responsible for tailing log files and extracting new log lines to be passed into the virtual machines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Lines chan<- string
	W     watcher.Watcher // Not required, will use watcher.LogWatcher if it is zero.
	FS    afero.Fs        // Not required, will use afero.OsFs if it is zero.
}

Options configures a Tailer

type Tailer

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

Tailer receives notification of changes from a Watcher and extracts new log lines from files. It also handles new log file creation events and log rotations.

func New

func New(o Options) (*Tailer, error)

New returns a new Tailer, configured with the supplied Options

func (*Tailer) Close

func (t *Tailer) Close()

Close signals termination to the watcher.

func (*Tailer) Tail

func (t *Tailer) Tail(pathname string)

Tail registers a file path to be tailed.

func (*Tailer) TailFile

func (t *Tailer) TailFile(f afero.File) error

TailFile registers a file handle to be tailed. There is no filesystem to watch, so no watches are registered, and no file paths are opened.

Jump to

Keyboard shortcuts

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