reader

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdReader

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

func Cmd

func Cmd(rundir string) (*CmdReader, error)

Cmd returns a new reader, ready to read from it will truncate the file after every read back to the initial size

func (*CmdReader) Read

func (r *CmdReader) Read(p []byte) (n int, err error)

Clear out any new data and seek back to end for next read

type Reader

type Reader struct {
	io.ReadCloser
}

Reader is a simple implementation of tail -f It has a relatively slow read cycle of 500ms

func New

func New(name string) (*Reader, error)

New returns a new reader, ready to read from

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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