processor

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TimeReport time.Duration

	TickerReportFile *time.Ticker
	Ticker           *time.Ticker
)

Functions

func Clean

func Clean(ctx context.Context, pipe <-chan *pipelines.LogEntry, wg *sync.WaitGroup, mu *sync.Mutex, Shipper pkgEx.Shipper)

Clean function that processes the received information and sends it to their corresponding functions

Parameters:

  • ctx: context for cancellation (not explicitly used in the current body)
  • pipe: input channel of *pipelines.LogEntry. Processing continues until the channel is closed and all remaining entries are drained.
  • wg: WaitGroup to notify the caller that the goroutine has completed
  • mu: mutex protecting the shared maps 'logs' and 'logsBurst'.

The function performs:

  • Sanitization and clustering of log content.
  • Statistics updates by source and message (logs).
  • Burst detection by log level (logsBurst).
  • Returning processed objects back to pools (EntryPool, BufferPool).
  • Periodic exporting triggered by Ticker.C Sends logs to exporter.ShipLogs, exporter.Console and integrations.Integrations. If GenerateLogsFile is enabled, accumulates logs for later writing.
  • File Export triggered by TickerReportFile.C when GenerateLogsFile is true.

Note: This functions is intented to run as a concurrent goroutine. It uses the unsafe package for zero-copy byte-to-string conversions, assuming the underlying buffers will not be modified afterward.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL