ztail

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package ztail provides facilities for watching a directory of logs, tailing all the files created within it and transforming the data into zng data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tailer

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

Tailer is a zio.Reader that watches a specified directory and starts tailing existing and newly created files in the directory for new logs. Newly written log data are transformed into *zed.Values and returned on a first-come-first serve basis.

func New

func New(zctx *zed.Context, dir string, opts anyio.ReaderOpts, warner zio.Warner, globs ...string) (*Tailer, error)

func (*Tailer) Close

func (t *Tailer) Close() error

func (*Tailer) Read

func (t *Tailer) Read() (*zed.Value, error)

func (*Tailer) Stop

func (t *Tailer) Stop() error

Stop instructs the directory watcher and indiviual file watchers to stop watching for changes. Read will emit EOS when the remaining unread data in files has been read.

Jump to

Keyboard shortcuts

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