reader

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(ctx context.Context, r io.Reader) (chan *v1.GrpcLogEntry, chan error)

Read returns a channel of log entries and a channel containing the possible error. The entries channel is closed when an error is returned or when the input is fully consumed.

func ReadFile added in v0.7.0

func ReadFile(ctx context.Context, filename string, follow bool) (chan *v1.GrpcLogEntry, chan error)

ReadFile returns a channel of log entries and a channel containing the possible error. The entries channel is closed when an error is returned or when the input is fully consumed if follow is false. If follow is true the channel will only be closed when the context is canceled.

func ReadFileInto added in v0.7.0

func ReadFileInto(ctx context.Context, filename string, res chan *v1.GrpcLogEntry, follow bool) error

ReadFileInto reads log entries from filename and writes to channel res, optionally "follwing" the file for new appended data.

func ReadInto

func ReadInto(ctx context.Context, r io.Reader, res chan *v1.GrpcLogEntry) error

ReadInto reads log entries from r and writes to channel res.

Types

This section is empty.

Jump to

Keyboard shortcuts

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