Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - type DelimiterPair
 - type PairScanner
 - func (pairScanner *PairScanner) Buffered() io.Reader
 - func (pairScanner *PairScanner) Scan(pairs []DelimiterPair) (line []byte, err error)
 - func (pairScanner *PairScanner) ScanDelimiters(delimiters string) (line []byte, err error)
 - func (pairScanner *PairScanner) SetDiscardLeading(discard bool) *PairScanner
 
- type ReaderPool
 - type WriterPool
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var ( ErrMismatchTokenPair = errors.New("mismatch token pair") ErrInvalidStartToken = errors.New("invalid start token") )
Functions ¶
This section is empty.
Types ¶
type DelimiterPair ¶
type DelimiterPair struct {
	// contains filtered or unexported fields
}
    type PairScanner ¶
type PairScanner struct {
	// contains filtered or unexported fields
}
    A PairScanner reads and decodes Pair wrapped values from an input stream, like a json、xml.
func NewPairScanner ¶
func NewPairScanner(r io.Reader) *PairScanner
NewPairScanner returns a new scanner that reads from r.
The scanner introduces its own buffering and may read data from r beyond the JSON values requested.
func (*PairScanner) Buffered ¶
func (pairScanner *PairScanner) Buffered() io.Reader
Buffered returns a reader of the data remaining in the PairScanner's buffer. The reader is valid until the next call to Decode.
func (*PairScanner) Scan ¶
func (pairScanner *PairScanner) Scan(pairs []DelimiterPair) (line []byte, err error)
Scan reads the next value complete wrapped by pair delimiters from its input and stores it in the value pointed to by v.
func (*PairScanner) ScanDelimiters ¶
func (pairScanner *PairScanner) ScanDelimiters(delimiters string) (line []byte, err error)
func (*PairScanner) SetDiscardLeading ¶
func (pairScanner *PairScanner) SetDiscardLeading(discard bool) *PairScanner
type ReaderPool ¶
type ReaderPool struct {
	// contains filtered or unexported fields
}
    func NewReaderPool ¶
func NewReaderPool() *ReaderPool
func NewReaderPoolSize ¶
func NewReaderPoolSize(size int) *ReaderPool
func (*ReaderPool) Clear ¶
func (p *ReaderPool) Clear()
func (*ReaderPool) Put ¶
func (p *ReaderPool) Put(br *bufio.Reader)
type WriterPool ¶
type WriterPool struct {
	// contains filtered or unexported fields
}
    func NewWriterPool ¶
func NewWriterPool() *WriterPool
func NewWriterPoolSize ¶
func NewWriterPoolSize(size int) *WriterPool
func (*WriterPool) Clear ¶
func (p *WriterPool) Clear()
func (*WriterPool) Put ¶
func (p *WriterPool) Put(br *bufio.Writer)
 Click to show internal directories. 
   Click to hide internal directories.