Documentation
¶
Index ¶
- func CollectEventsData(events []data.LogEvent) []data.Event
- func CollectLogs(params data.ParseParams) ([]string, error)
- func FormatBytes(bytes uint64) string
- func GetMemStats() runtime.MemStats
- func LocalEvents(params data.ParseParams) error
- func ParseFiles(ctx context.Context, files []string) []data.LogEvent
- func ParseFilesSequential(ctx context.Context, files []string) []data.LogEvent
- func ParseFilesStreaming(ctx context.Context, files []string, workers int) []data.LogEvent
- func ParseFilesWithWorkers(ctx context.Context, files []string, workers int) []data.LogEvent
- func PrintMemoryStats(label string)
- func RemoteEvents(params data.ParseParams) error
- type StreamingParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectEventsData ¶
CollectEventsData collect data from events logs.
func CollectLogs ¶
func CollectLogs(params data.ParseParams) ([]string, error)
func FormatBytes ¶
FormatBytes formats bytes to human-readable format
func GetMemStats ¶
GetMemStats returns current memory statistics
func LocalEvents ¶
func LocalEvents(params data.ParseParams) error
func ParseFiles ¶
ParseFiles parses log files in parallel using a worker pool
func ParseFilesSequential ¶
ParseFilesSequential parses files sequentially (legacy fallback)
func ParseFilesStreaming ¶
ParseFilesStreaming parses files in streaming mode and returns all events This is a convenience wrapper that collects all events
func ParseFilesWithWorkers ¶
ParseFilesWithWorkers parses log files in parallel with specified number of workers If workers <= 0, uses runtime.NumCPU()
func PrintMemoryStats ¶
func PrintMemoryStats(label string)
PrintMemoryStats prints current memory usage
func RemoteEvents ¶
func RemoteEvents(params data.ParseParams) error
Types ¶
type StreamingParser ¶
type StreamingParser struct {
// contains filtered or unexported fields
}
StreamingParser manages streaming log parsing with memory efficiency
func NewStreamingParser ¶
func NewStreamingParser(ctx context.Context, files []string, workers int) *StreamingParser
NewStreamingParser creates a new streaming parser
func (*StreamingParser) Done ¶
func (sp *StreamingParser) Done() <-chan struct{}
Done returns the done channel
func (*StreamingParser) Errors ¶
func (sp *StreamingParser) Errors() <-chan error
Errors returns the errors channel
func (*StreamingParser) Events ¶
func (sp *StreamingParser) Events() <-chan data.LogEvent
Events returns the events channel for consumption
func (*StreamingParser) Stats ¶
func (sp *StreamingParser) Stats() (events int64, files int64)
Stats returns current parsing statistics