emitter

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTerminal

func IsTerminal(w io.Writer) bool

func NewFileFromPath

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

func NewFileFromURI

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

func NewSizeSplitter added in v1.2.0

func NewSizeSplitter(ctx context.Context, engine storage.Engine, dir *storage.URI, prefix string, unbuffered bool,
	opts anyio.WriterOpts, size int64) (zio.WriteCloser, error)

NewSizeSplitter returns a zio.WriteCloser that writes to sequentially numbered files created by engine in dir with optional prefix and with opts, creating a new file after the current one reaches size bytes. Files may exceed size substantially due to buffering in the underlying writer as determined by opts.Format.

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 Split added in v1.0.0

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

func NewSplit added in v1.0.0

func NewSplit(ctx context.Context, engine storage.Engine, dir *storage.URI, prefix string, unbuffered bool, opts anyio.WriterOpts) (*Split, error)

func (*Split) Close added in v1.0.0

func (s *Split) Close() error

func (*Split) Write added in v1.0.0

func (s *Split) Write(r zed.Value) error

Jump to

Keyboard shortcuts

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