Documentation
¶
Index ¶
- func WithDepth(depth int64) optionFn
- func WithExtraDelimiter(extraDelimiter []string) optionFn
- func WithMaxChildren(maxChildren int64) optionFn
- func WithMaxCluster(maxClusters int) optionFn
- func WithSimTh(simTh float64) optionFn
- type ClusterUpdateType
- type Drain
- func (d *Drain) AddLogMessage(content string) (*LogCluster, ClusterUpdateType, error)
- func (d *Drain) GetClusters() []*LogCluster
- func (d *Drain) MarshalJSON() ([]byte, error)
- func (d *Drain) Match(content string, strategy SearchStrategy) (*LogCluster, error)
- func (d *Drain) PrintTree(maxClusters int)
- func (d *Drain) UnmarshalJSON(data []byte) error
- type ExtractedParameter
- type FilePersistence
- type LogCluster
- type MemoryPersistence
- type Node
- type PersistenceHandler
- type SearchStrategy
- type SerializableDrain
- type TemplateMiner
- func (m *TemplateMiner) AddLogMessage(ctx context.Context, content string) (ClusterUpdateType, *LogCluster, string, int, error)
- func (m *TemplateMiner) ExtractParameters(logTemplate, logMessage string) []*ExtractedParameter
- func (m *TemplateMiner) GetParameterList(logTemplate, logMessage string) []string
- func (m *TemplateMiner) LoadState(ctx context.Context) error
- func (m *TemplateMiner) Match(content string, strategy SearchStrategy) (*LogCluster, error)
- func (m *TemplateMiner) SaveState(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithExtraDelimiter ¶
func WithExtraDelimiter(extraDelimiter []string) optionFn
func WithMaxChildren ¶
func WithMaxChildren(maxChildren int64) optionFn
func WithMaxCluster ¶
func WithMaxCluster(maxClusters int) optionFn
Types ¶
type ClusterUpdateType ¶
type ClusterUpdateType int
const ( ClusterUpdateTypeNone ClusterUpdateType = iota ClusterUpdateTypeCreated ClusterUpdateTypeTemplateChanged )
type Drain ¶
type Drain struct { LogClusterDepth int64 MaxNodeDepth int64 SimTh float64 MaxChildren int64 RootNode *Node MaxClusters int ExtraDelimiters []string ParamStr string ParametrizeNumericTokens bool IdToCluster *lru.Cache[int64, *LogCluster] `json:"-"` ClustersCounter int64 }
func (*Drain) AddLogMessage ¶
func (d *Drain) AddLogMessage(content string) (*LogCluster, ClusterUpdateType, error)
func (*Drain) GetClusters ¶
func (d *Drain) GetClusters() []*LogCluster
func (*Drain) MarshalJSON ¶
func (*Drain) Match ¶
func (d *Drain) Match(content string, strategy SearchStrategy) (*LogCluster, error)
func (*Drain) UnmarshalJSON ¶
type ExtractedParameter ¶
type FilePersistence ¶
type FilePersistence struct {
// contains filtered or unexported fields
}
func NewFilePersistence ¶
func NewFilePersistence(filePath string) *FilePersistence
func (*FilePersistence) LoadState ¶
func (p *FilePersistence) LoadState() ([]byte, error)
func (*FilePersistence) SaveState ¶
func (p *FilePersistence) SaveState(state []byte) error
type LogCluster ¶
func NewLogCluster ¶
func NewLogCluster(clusterId int64, logTemplateTokens []string) *LogCluster
func (*LogCluster) GetTemplate ¶
func (l *LogCluster) GetTemplate() string
func (*LogCluster) String ¶
func (l *LogCluster) String() string
type MemoryPersistence ¶
type MemoryPersistence struct {
State []byte
}
func NewMemoryPersistence ¶
func NewMemoryPersistence() *MemoryPersistence
type PersistenceHandler ¶
type SearchStrategy ¶
type SearchStrategy int
const ( SearchStrategyNever SearchStrategy = iota SearchStrategyFallback SearchStrategyAlways )
type SerializableDrain ¶
type TemplateMiner ¶
type TemplateMiner struct {
// contains filtered or unexported fields
}
func NewTemplateMiner ¶
func NewTemplateMiner(drain *Drain, persistence PersistenceHandler) *TemplateMiner
func (*TemplateMiner) AddLogMessage ¶
func (m *TemplateMiner) AddLogMessage(ctx context.Context, content string) (ClusterUpdateType, *LogCluster, string, int, error)
func (*TemplateMiner) ExtractParameters ¶
func (m *TemplateMiner) ExtractParameters(logTemplate, logMessage string) []*ExtractedParameter
func (*TemplateMiner) GetParameterList ¶
func (m *TemplateMiner) GetParameterList(logTemplate, logMessage string) []string
func (*TemplateMiner) Match ¶
func (m *TemplateMiner) Match(content string, strategy SearchStrategy) (*LogCluster, error)
Click to show internal directories.
Click to hide internal directories.