{"modulePath":"github.com/qiniu/Logkit","version":"v1.5.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package bufreader\n\nPackage bufio implements buffered I/O.  It wraps an FileReader or io.Writer object, creating another object (Reader or Writer) that also implements the interface but provides buffering and some help for textual I/O.\n\n## Constants\n\n```go\nconst (\n\tDefaultBufSize           = 4096\n\tMaxHeadPatternBufferSize = 20 * 1024 * 1024\n)\n```\n\n## Variables\n\n```go\nvar (\n\tErrInvalidUnreadByte = errors.New(\"bufio: invalid use of UnreadByte\")\n\tErrInvalidUnreadRune = errors.New(\"bufio: invalid use of UnreadRune\")\n\tErrBufferFull        = errors.New(\"bufio: buffer full\")\n\tErrNegativeCount     = errors.New(\"bufio: negative count\")\n)\n```\n\n## Functions\n\n```go\nfunc NewFileDirReader(meta *reader.Meta, conf conf.MapConf) (reader reader.Reader, err error)\n```\n\n```go\nfunc NewSingleFileReader(meta *reader.Meta, conf conf.MapConf) (reader reader.Reader, err error)\n```\n\n## Types\n\n```go\ntype BufReader struct {\n\tMeta *reader.Meta // 存放offset的元信息\n\t// contains filtered or unexported fields\n}\n```\nBufReader implements buffering for an FileReader object.\n\n```go\nfunc NewReaderSize(rd reader.FileReader, meta *reader.Meta, size int) (*BufReader, error)\n```\nNewReaderSize returns a new Reader whose buffer has at least the specified size. If the argument FileReader is already a Reader with large enough size, it returns the underlying Reader.\n\n```go\nfunc (b *BufReader) Close() error\n```\n\n```go\nfunc (b *BufReader) FormMutiLine() []byte\n```\n\n```go\nfunc (b *BufReader) Lag() (rl *LagInfo, err error)\n```\n\n```go\nfunc (b *BufReader) Name() string\n```\n\n```go\nfunc (b *BufReader) ReadDone() bool\n```\n\n```go\nfunc (b *BufReader) ReadLine() (ret string, err error)\n```\nReadLine returns a string line as a normal Reader\n\n```go\nfunc (b *BufReader) ReadPattern() (string, error)\n```\nReadPattern读取日志直到匹配行首模式串\n\n```go\nfunc (b *BufReader) ReadString(delim byte) (ret string, err error)\n```\nReadString reads until the first occurrence of delim in the input, returning a string containing the data up to and including the delimiter. If ReadString encounters an error before finding a delimiter, it returns the data read before the error and the error itself (often io.EOF). ReadString returns err != nil if and only if the returned data does not end in delim. For simple uses, a Scanner may be more convenient.\n\n```go\nfunc (b *BufReader) SetMode(mode string, v interface{}) (err error)\n```\n\n```go\nfunc (b *BufReader) SetRunTime(mode string, v interface{}) (err error)\n```\n\n```go\nfunc (b *BufReader) Source() string\n```\n\n```go\nfunc (b *BufReader) Status() StatsInfo\n```\n\n```go\nfunc (b *BufReader) SyncMeta()\n```\n\n```go\ntype LastSync struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype LineCache struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewLineCache() *LineCache\n```\n\n```go\nfunc (l *LineCache) Append(r string)\n```\n\n```go\nfunc (l *LineCache) Combine() []byte\n```\n\n```go\nfunc (l *LineCache) Set(r []string)\n```\n\n```go\nfunc (l *LineCache) Size() int\n```\n\n```go\nfunc (l *LineCache) TotalLen() int\n```\n\n","path":"github.com/qiniu/Logkit/reader/bufreader","name":"bufreader","synopsis":"Package bufio implements buffered I/O. It wraps an FileReader or io.Writer object, creating another object (Reader or Writer) that also implements the interface but provides buffering and some help for textual I/O.","isRedistributable":true}
