engine

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Events = &EventCache{records: make(map[string]*types.Event)}
View Source
var (
	FromAgent = "unknown"
)

Functions

func PushRawEvents

func PushRawEvents(pluginName string, pluginObj plugins.Plugin, ins plugins.Instance, queue *safe.Queue[*types.Event])

Types

type EventCache

type EventCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

这里不需要定期清理,原因: 1. 内存里的事件数量不大 2. 有些事件就是很久才恢复,恢复的时候如果发现之前告警的事件已经被清理了,就无法生成恢复事件了

func (*EventCache) Del

func (c *EventCache) Del(key string)

func (*EventCache) Get

func (c *EventCache) Get(key string) *types.Event

func (*EventCache) Set

func (c *EventCache) Set(val *types.Event)

Jump to

Keyboard shortcuts

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