 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
const ( MinBufferSize = 512 DefaultBufferSize = 65536 )
Variables ¶
      View Source
      
  
var ErrInvalidUTF8 = goerrors.New("invalid UTF8 encoding")
    Functions ¶
This section is empty.
Types ¶
type JSONArrayStream ¶
type JSONArrayStream struct {
	// contains filtered or unexported fields
}
    JSONArrayStream is a log entry stream that iterates over the elements of a JSON Array. This can reduce memory overhead in cases log events are delivered as elements of an array instead of one per-line.
func NewJSONArrayStream ¶
func NewJSONArrayStream(r io.Reader, size int, path ...string) *JSONArrayStream
NewJSONArrayStream creates a new JSON Array stream. r is the underlying io.Reader size is the read buffer size for the jsoniter.Iterator path is a path to the array value to extract elements from (empty means the input JSON is an array itself)
func (*JSONArrayStream) Err ¶
func (s *JSONArrayStream) Err() error
Err implements the Stream interface
func (*JSONArrayStream) Next ¶
func (s *JSONArrayStream) Next() []byte
Next implements the Stream interface
type LineStream ¶
type LineStream struct {
	// contains filtered or unexported fields
}
    func NewLineStream ¶
func NewLineStream(r io.Reader, size int) *LineStream
func (*LineStream) Err ¶
func (s *LineStream) Err() error
Err returns the first non-EOF error that was encountered by the Scanner.
type Stream ¶
type Stream interface {
	// Next will read the next log entry.
	// If it returns `nil` no more log entries are available in the stream.
	// The slice returned is stable until the next call to `Next()`
	Next() []byte
	// Err returns the first non-EOF error that was encountered by the Stream.
	Err() error
}
    Stream is the common interface for reading log entries
 Click to show internal directories. 
   Click to hide internal directories.