cpudetector

package
v0.0.0-...-9e2a447 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DetectorCpuType string = "detector_cpu"
)

Variables

This section is empty.

Functions

func NewCpuDetector

func NewCpuDetector(cfg any, consumers []consumer.Consumer) detector.Detector

Types

type Config

type Config struct {
	EventName     string
	SessionInfos  []SubSession `mapstructure:"sessioninfo"`
	EventChanSize int
	SegmentSize   int `mapstrucrure:"segmentSize"`
}

func NewConfig

func NewConfig() *Config

type CpuDetector

type CpuDetector struct {
	Server string
	// contains filtered or unexported fields
}

func (*CpuDetector) ConsumeChanEvents

func (c *CpuDetector) ConsumeChanEvents()

func (*CpuDetector) ConsumeCommEvent

func (c *CpuDetector) ConsumeCommEvent(e *model.SpyEvent) error

func (*CpuDetector) ConsumeEvent

func (c *CpuDetector) ConsumeEvent(e *model.SpyEvent) error

called by receiver

func (*CpuDetector) Init

func (c *CpuDetector) Init(cfg any) error

all cpu tool config will init here, config.ONCPU, config.ONCPU, config.FutexSnoop, etc

func (*CpuDetector) Name

func (c *CpuDetector) Name() string

func (*CpuDetector) OwnedEvents

func (c *CpuDetector) OwnedEvents() []string

Notice: hard code, new tool added update this function

func (*CpuDetector) ProcessEvent

func (c *CpuDetector) ProcessEvent(e *model.SpyEvent) error

send to next consumer

func (*CpuDetector) Start

func (c *CpuDetector) Start() error

func (*CpuDetector) Stop

func (c *CpuDetector) Stop() error

func (*CpuDetector) UploadTries

func (c *CpuDetector) UploadTries(endTimeTruncated time.Time)

func (*CpuDetector) UploadWithTicker

func (c *CpuDetector) UploadWithTicker()

type SubSession

type SubSession struct {
	Class  string            `mapstructure:"class"`
	Name   string            `mapstructure:"name"`
	Params map[string]string `mapstructure:"params"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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