drain3

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = &Config{
	Depth:        8,
	SimilarityTh: 0.7,
	MaxChildren:  100,
	MaxClusters:  1000,
}

DefaultConfig provides default values for Drain configuration

Functions

This section is empty.

Types

type Config

type Config struct {
	Depth        int64   // Parse tree depth
	SimilarityTh float64 // Similarity threshold
	MaxChildren  int64   // Max children per node
	MaxClusters  int     // Max number of clusters
}

type Drain

type Drain struct {
	*goDrain.Drain // Embedded Drain instance for log processing
	// contains filtered or unexported fields
}

func New

func New(config *Config) *Drain

New creates a new Drain instance with the provided configuration

func (*Drain) AddLogMessage

func (d *Drain) AddLogMessage(logMessage string) error

AddLogMessage processes a single log message and returns the cluster it belongs to

func (*Drain) GetClusters

func (d *Drain) GetClusters() []*goDrain.LogCluster

GetClusters returns the current clusters of log templates

func (*Drain) Reset

func (d *Drain) Reset() error

Jump to

Keyboard shortcuts

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