Documentation
¶
Index ¶
- func WithDrainDepth(depth int) minerOption
- func WithDrainMaxChildren(maxChildren int) minerOption
- func WithDrainMaxCluster(maxCluster int) minerOption
- func WithDrainSim(sim float32) minerOption
- func WithMaskInsturction(pattern, maskWith string) minerOption
- func WithMaskPrefix(prefix string) minerOption
- func WithMaskSuffix(suffix string) minerOption
- type ClusterUpdateType
- type InternalError
- type LogCluster
- type LogMessageResponse
- type MaskPatternError
- type RedisClient
- type RedisPersistence
- type SearchStrategy
- type TemplateMiner
- func (miner *TemplateMiner) AddLogMessage(message string) *LogMessageResponse
- func (miner *TemplateMiner) MarshalJSON() ([]byte, error)
- func (miner *TemplateMiner) Match(message string) *LogCluster
- func (miner *TemplateMiner) Status() string
- func (miner *TemplateMiner) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDrainDepth ¶
func WithDrainDepth(depth int) minerOption
func WithDrainMaxChildren ¶
func WithDrainMaxChildren(maxChildren int) minerOption
func WithDrainMaxCluster ¶
func WithDrainMaxCluster(maxCluster int) minerOption
func WithDrainSim ¶
func WithDrainSim(sim float32) minerOption
func WithMaskInsturction ¶
func WithMaskInsturction(pattern, maskWith string) minerOption
func WithMaskPrefix ¶
func WithMaskPrefix(prefix string) minerOption
func WithMaskSuffix ¶
func WithMaskSuffix(suffix string) minerOption
Types ¶
type ClusterUpdateType ¶
type ClusterUpdateType int
const ( CLUSTER_UPDATE_TYPE_NONE ClusterUpdateType = iota CLUSTER_UPDATE_TYPE_NEW_CLUSTER CLUSTER_UPDATE_TYPE_UPDATE_CLUSTER )
type InternalError ¶
type InternalError struct{}
func (InternalError) Error ¶
func (InternalError) Error() string
type LogCluster ¶
type LogCluster struct {
// contains filtered or unexported fields
}
func (*LogCluster) MarshalJSON ¶
func (cluster *LogCluster) MarshalJSON() ([]byte, error)
func (*LogCluster) UnmarshalJSON ¶
func (cluster *LogCluster) UnmarshalJSON(data []byte) error
type LogMessageResponse ¶
type LogMessageResponse struct { ChangeType ClusterUpdateType Cluster *LogCluster TemplateMined string ClusterCount int }
type MaskPatternError ¶
type MaskPatternError struct{}
func (MaskPatternError) Error ¶
func (MaskPatternError) Error() string
type RedisClient ¶
type RedisClient interface { Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd Get(ctx context.Context, key string) *redis.StringCmd Subscribe(ctx context.Context, channels ...string) *redis.PubSub }
RedisClient for mock testing
type RedisPersistence ¶
type RedisPersistence struct {
// contains filtered or unexported fields
}
func NewRedisPersistence ¶
func NewRedisPersistence(addr, password string, db int, serviceKey string) *RedisPersistence
func (*RedisPersistence) Load ¶
func (p *RedisPersistence) Load(ctx context.Context) (*TemplateMiner, error)
func (*RedisPersistence) Save ¶
func (p *RedisPersistence) Save(ctx context.Context, template *TemplateMiner) error
func (*RedisPersistence) Subscribe ¶
func (p *RedisPersistence) Subscribe(ctx context.Context) *redis.PubSub
type SearchStrategy ¶
type SearchStrategy int
const ( SEARCH_STRATEGY_NEVER SearchStrategy = iota SEARCH_STRATEGY_FALLBACK SEARCH_STRATEGY_ALWAYS )
type TemplateMiner ¶
type TemplateMiner struct {
// contains filtered or unexported fields
}
func NewTemplateMiner ¶
func NewTemplateMiner(options ...minerOption) (*TemplateMiner, error)
func (*TemplateMiner) AddLogMessage ¶
func (miner *TemplateMiner) AddLogMessage(message string) *LogMessageResponse
func (*TemplateMiner) MarshalJSON ¶
func (miner *TemplateMiner) MarshalJSON() ([]byte, error)
func (*TemplateMiner) Match ¶
func (miner *TemplateMiner) Match(message string) *LogCluster
func (*TemplateMiner) Status ¶
func (miner *TemplateMiner) Status() string
func (*TemplateMiner) UnmarshalJSON ¶
func (miner *TemplateMiner) UnmarshalJSON(data []byte) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.