Documentation
¶
Index ¶
- Constants
- func GetAllModules() map[string]IModule
- func NewJueServer(c *goJueConfig, opts ...RunOption) (*goJueSrv, error)
- func Register(p IModule)
- type EventType
- type IClose
- type IConfig
- type IEventStruct
- type IModule
- type Module
- func (this *Module) Close() error
- func (this *Module) Decode(em *ebpf.Map, b []byte) (event IEventStruct, err error)
- func (this *Module) DecodeFun(p *ebpf.Map) (IEventStruct, bool)
- func (this *Module) Dispatcher(e IEventStruct)
- func (this *Module) Events() []*ebpf.Map
- func (this *Module) Init(ctx context.Context, logger *log.Logger, conf IConfig)
- func (this *Module) Name() string
- func (this *Module) Run() error
- func (this *Module) SetChild(module IModule)
- func (this *Module) Start() error
- func (this *Module) Stop() error
- type RunOption
Constants ¶
View Source
const ( ServiceTypeCli int = 1 ServiceTypeMicroSrv int = 2 )
View Source
const ( PROBE_TYPE_UPROBE = "uprobe" PROBE_TYPE_KPROBE = "kprobe" PROBE_TYPE_TP = "tracepoint" PROBE_TYPE_XDP = "XDP" )
View Source
const ( ELF_TYPE_BIN uint8 = 1 ELF_TYPE_SO uint8 = 2 )
View Source
const ( X86_BINARY_PREFIX = "/lib/x86_64-linux-gnu" OTHERS_BINARY_PREFIX = "/usr/lib" )
View Source
const KERNEL_LESS_5_2_PREFIX = "_less52.o"
Variables ¶
This section is empty.
Functions ¶
func NewJueServer ¶
Types ¶
type IEventStruct ¶
type IModule ¶
type IModule interface {
// Init 初始化
Init(context.Context, *log.Logger, IConfig) error
// Name 获取当前module的名字
Name() string
// Run 事件监听感知
Run() error
// Start 启动模块
Start() error
// Stop 停止模块
Stop() error
// Close 关闭退出
Close() error
SetChild(module IModule)
Decode(*ebpf.Map, []byte) (IEventStruct, error)
Events() []*ebpf.Map
DecodeFun(p *ebpf.Map) (IEventStruct, bool)
Dispatcher(IEventStruct)
}
func GetModuleByName ¶
GetModulesByName 根据模块名获取modules列表
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) Dispatcher ¶
func (this *Module) Dispatcher(e IEventStruct)
写入数据,或者上传到远程数据库,写入到其他chan 等。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.