Documentation ¶
Index ¶
- func BuildProfilingStat(ps *process.Process) (*profiling.Info, error)
- func DurationMustNotNull(err error, confKey, confValue string) (time.Duration, error)
- func EntityIsSameWithProtocol(processEntity *api.ProcessEntity, protocolEntity *v3.EBPFProcessEntityMetadata) bool
- func ParseLabels(labelStr string) []string
- func RegexMustNotNull(err error, confKey, confValue string) (*regexp.Regexp, error)
- func StringMustNotNull(err error, confKey, confValue string) error
- type BuildEBPFProcessContext
- type DetectedProcess
- type FinderBaseConfig
- type ProcessFinder
- type ProcessManager
- type TemplateBuilder
- type TemplateProcess
- type TemplateRover
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildProfilingStat ¶
BuildProfilingStat use to build the profiling info for profiling
func DurationMustNotNull ¶
func EntityIsSameWithProtocol ¶
func EntityIsSameWithProtocol(processEntity *api.ProcessEntity, protocolEntity *v3.EBPFProcessEntityMetadata) bool
func ParseLabels ¶
func RegexMustNotNull ¶
func StringMustNotNull ¶
Types ¶
type BuildEBPFProcessContext ¶
type BuildEBPFProcessContext struct {
HostIP string
}
type DetectedProcess ¶
type DetectedProcess interface { // Pid of process in host Pid() int32 // OriginalProcess is works for query the process data OriginalProcess() *process.Process // Entity of process, is related with backend entity Entity() *api.ProcessEntity // DetectType define the process find type DetectType() api.ProcessDetectType // ProfilingStat of process ProfilingStat() *profiling.Info }
DetectedProcess from the finder
type FinderBaseConfig ¶
type FinderBaseConfig interface { // ActiveFinder to detect process ActiveFinder() bool }
type ProcessFinder ¶
type ProcessFinder interface { // Init the finder before Start Init(ctx context.Context, conf FinderBaseConfig, manager ProcessManager) error // Start to detect process Start() // Stop the process detect Stop() error // DetectType of Process is detecting DetectType() api.ProcessDetectType // ValidateProcessIsSame between two same finder process ValidateProcessIsSame(p1, p2 DetectedProcess) bool // BuildEBPFProcess is transform the process entity as backend protocol data BuildEBPFProcess(ctx *BuildEBPFProcessContext, process DetectedProcess) *v3.EBPFProcessProperties // BuildNecessaryProperties is getting minimize necessary properties when keep alive BuildNecessaryProperties(process DetectedProcess) []*commonv3.KeyStringValuePair // ParseProcessId is means how to read the process id receive from backend ParseProcessID(process DetectedProcess, downstream *v3.EBPFProcessDownstream) string }
ProcessFinder is defined how to detect the process and communicate with backend
type ProcessManager ¶
type ProcessManager interface { GetModuleManager() *module.Manager // SyncAllProcessInFinder is mean synchronized all processes data from current ProcessFinder SyncAllProcessInFinder(processes []DetectedProcess) }
ProcessManager is an API work for help ProcessFinder synchronized process with backend
type TemplateBuilder ¶
type TemplateBuilder struct { Name string Template string // contains filtered or unexported fields }
func NewTemplateBuilder ¶
func NewTemplateBuilder(name, content string) (*TemplateBuilder, error)
func TemplateMustNotNull ¶
func TemplateMustNotNull(err error, confKey, confValue string) (*TemplateBuilder, error)
func (*TemplateBuilder) Execute ¶
func (t *TemplateBuilder) Execute(data interface{}) (string, error)
type TemplateProcess ¶
func NewTemplateProcess ¶
func NewTemplateProcess(manager *module.Manager, p *process.Process) *TemplateProcess
NewTemplateProcess is generated the process context for render
func (*TemplateProcess) CommandLine ¶
func (p *TemplateProcess) CommandLine() (string, error)
CommandLine command line of process
func (*TemplateProcess) ExeFilePath ¶
func (p *TemplateProcess) ExeFilePath() (string, error)
ExeFilePath Execute file path
func (*TemplateProcess) ExeName ¶
func (p *TemplateProcess) ExeName() (string, error)
ExeName Execute file name
func (*TemplateProcess) WorkDir ¶
func (p *TemplateProcess) WorkDir() (string, error)
WorkDir means which directory to run the execute file
type TemplateRover ¶
type TemplateRover struct {
// contains filtered or unexported fields
}
func NewTemplateRover ¶
func NewTemplateRover(manager *module.Manager) *TemplateRover
NewTemplateRover is generated the Rover context for render
func (*TemplateRover) HostIPV4 ¶
func (t *TemplateRover) HostIPV4(name string) (string, error)
HostIPV4 ip v4 address of local machine from appoint net interface name
func (*TemplateRover) HostIPV6 ¶
func (t *TemplateRover) HostIPV6(name string) (string, error)
HostIPV6 ip v6 address of local machine from appoint net interface name
func (*TemplateRover) HostName ¶
func (t *TemplateRover) HostName() string
HostName name of local machine