Documentation ¶
Index ¶
- Constants
- Variables
- type LinePtr
- type LogView
- func (lv *LogView) Close()
- func (lv *LogView) FirstLinePtr() (*LinePtr, error)
- func (lv *LogView) LastLinePtr(linePtr *LinePtr) (*LinePtr, error)
- func (lv *LogView) Move(linePtr *LinePtr, offset int) (int, *LinePtr, error)
- func (lv *LogView) NextLinePtr(linePtr *LinePtr) (*LinePtr, error)
- func (lv *LogView) PrevLinePtr(linePtr *LinePtr) (*LinePtr, error)
- func (lv *LogView) ReadLineData(linePtr *LinePtr) ([]byte, error)
- func (lv *LogView) ReadWindow(linePtr *LinePtr, winSize int) ([][]byte, error)
- type MultiBufferByteGetter
Constants ¶
View Source
const BufSize = 256 * 1024
View Source
const MaxLineSize = 1024
Variables ¶
View Source
var ErrBOF = errors.New("beginning of file")
Functions ¶
This section is empty.
Types ¶
type LogView ¶
type LogView struct { File *os.File MultiBuf *MultiBufferByteGetter MatchRe *regexp.Regexp }
func MakeLogView ¶
func (*LogView) FirstLinePtr ¶
type MultiBufferByteGetter ¶
type MultiBufferByteGetter struct { File *os.File Offset int64 EOF bool Buffers [][]byte BufSize int64 }
func MakeMultiBufferByteGetter ¶
func MakeMultiBufferByteGetter(file *os.File, bufSize int64) *MultiBufferByteGetter
func (*MultiBufferByteGetter) GetByte ¶
func (mb *MultiBufferByteGetter) GetByte(offset int64) (byte, error)
Click to show internal directories.
Click to hide internal directories.