emitter

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoPath = errors.New("no _path field in zng record")
)

Functions

func IsTerminal

func IsTerminal(w io.Writer) bool

func NewFileFromPath

func NewFileFromPath(ctx context.Context, engine storage.Engine, path string, opts anyio.WriterOpts) (zio.WriteCloser, error)

func NewFileFromURI

func NewFileFromURI(ctx context.Context, engine storage.Engine, path *storage.URI, opts anyio.WriterOpts) (zio.WriteCloser, error)

Types

type Bytes

type Bytes struct {
	zio.Writer
	// contains filtered or unexported fields
}

func NewBytes

func NewBytes(opts anyio.WriterOpts) (*Bytes, error)

func (*Bytes) Bytes

func (b *Bytes) Bytes() []byte

type Dir

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

Dir implements the Writer interface and sends all log lines with the same descriptor to a file named <prefix><path>.<ext> in the directory indicated, where <prefix> and <ext> are specificied and <path> is determined by the _path field in the boom descriptor. Note that more than one descriptor can map to the same output file.

func NewDir

func NewDir(ctx context.Context, engine storage.Engine, dir, prefix string, stderr io.Writer, opts anyio.WriterOpts) (*Dir, error)

func NewDirWithEngine

func NewDirWithEngine(ctx context.Context, engine storage.Engine, dir *storage.URI, prefix string, stderr io.Writer, opts anyio.WriterOpts) (*Dir, error)

func (*Dir) Close

func (d *Dir) Close() error

func (*Dir) Write

func (d *Dir) Write(r *zed.Record) error

Jump to

Keyboard shortcuts

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