Documentation
¶
Index ¶
- type Format
- type Parser
- func (p *Parser) DetectFormat(r io.Reader) (Format, error)
- func (p *Parser) GetSupportedTypes() []string
- func (p *Parser) Parse(ctx context.Context, content []byte, metadata map[string]any) (*core.Document, error)
- func (p *Parser) ParseStream(ctx context.Context, r io.Reader, metadata map[string]any) (<-chan *core.Document, error)
- func (p *Parser) SetChunkOverlap(overlap int)
- func (p *Parser) SetChunkSize(size int)
- func (p *Parser) SetFormat(format Format)
- func (p *Parser) SetPattern(pattern string) error
- func (p *Parser) Supports(contentType string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser implements a log parser with multiple format support
func DefaultParser ¶ added in v1.1.3
func DefaultParser() *Parser
DefaultParser creates a new log parser
func (*Parser) DetectFormat ¶
DetectFormat auto-detects log format from first few lines
func (*Parser) GetSupportedTypes ¶
GetSupportedTypes returns supported formats
func (*Parser) Parse ¶ added in v1.1.2
func (p *Parser) Parse(ctx context.Context, content []byte, metadata map[string]any) (*core.Document, error)
Parse implements the core.Parser interface
func (*Parser) ParseStream ¶
func (p *Parser) ParseStream(ctx context.Context, r io.Reader, metadata map[string]any) (<-chan *core.Document, error)
ParseStream implements the core.Parser interface
func (*Parser) SetChunkOverlap ¶
SetChunkOverlap sets the chunk overlap
func (*Parser) SetChunkSize ¶
SetChunkSize sets the chunk size
func (*Parser) SetPattern ¶
SetPattern sets custom regex pattern
Click to show internal directories.
Click to hide internal directories.