Documentation ¶
Index ¶
- func ProcessBuildersInit(builders []*ProcessBuilder) error
- type Config
- type EntityRenderContext
- type FilterContext
- type MeshConfig
- type PodContainer
- type Process
- type ProcessBuilder
- type ProcessFinder
- func (f *ProcessFinder) BuildEBPFProcess(ctx *base.BuildEBPFProcessContext, ps base.DetectedProcess) *v3.EBPFProcessProperties
- func (f *ProcessFinder) BuildNecessaryProperties(ps base.DetectedProcess) []*commonv3.KeyStringValuePair
- func (f *ProcessFinder) DetectType() api.ProcessDetectType
- func (f *ProcessFinder) Init(ctx context.Context, conf base.FinderBaseConfig, manager base.ProcessManager) error
- func (f *ProcessFinder) ParseProcessID(ps base.DetectedProcess, downstream *v3.EBPFProcessDownstream) string
- func (f *ProcessFinder) Start()
- func (f *ProcessFinder) Stop() error
- func (f *ProcessFinder) ValidateProcessIsSame(p1, p2 base.DetectedProcess) bool
- type Registry
- func (r *Registry) BuildPodContainers() map[string]*PodContainer
- func (r *Registry) FindServiceName(namespace, podName string) string
- func (r *Registry) OnAdd(_ interface{})
- func (r *Registry) OnDelete(_ interface{})
- func (r *Registry) OnUpdate(_, _ interface{})
- func (r *Registry) Start(stopChan chan struct{})
- type TemplateContainer
- type TemplatePod
- type TemplatePodJudgment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessBuildersInit ¶
func ProcessBuildersInit(builders []*ProcessBuilder) error
ProcessBuildersInit used to init process builders
Types ¶
type Config ¶
type Config struct { base.FinderBaseConfig Active bool `mapstrcture:"active"` NodeName string `mapstructure:"node_name"` Namespaces string `mapstructure:"namespaces"` Analyzers []*ProcessBuilder `mapstructure:"analyzers"` }
func (*Config) ActiveFinder ¶
type EntityRenderContext ¶
type EntityRenderContext struct { Rover *base.TemplateRover Process *base.TemplateProcess Pod *TemplatePod Container *TemplateContainer }
type FilterContext ¶
type FilterContext struct { Process *base.TemplateProcess Pod *TemplatePodJudgment Container *TemplateContainer }
type MeshConfig ¶
type MeshConfig struct {
ServiceName string `mapstructure:"service_name"`
}
type PodContainer ¶
type PodContainer struct { // pod references Pod *v1.Pod ContainerSpec v1.Container ContainerStatus v1.ContainerStatus // contains filtered or unexported fields }
func AnalyzeContainers ¶
func AnalyzeContainers(pod *v1.Pod, registry *Registry) []*PodContainer
AnalyzeContainers means query the containers by pod
func (*PodContainer) CGroupID ¶
func (c *PodContainer) CGroupID() string
func (*PodContainer) FindOwner ¶
func (c *PodContainer) FindOwner(ctx context.Context, kindName string, k8sConfig *rest.Config) (*metav1.OwnerReference, error)
FindOwner means query the owner in the container, it would loop up with parent owner until empty
func (*PodContainer) ServiceName ¶
func (c *PodContainer) ServiceName() string
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func NewProcess ¶
func NewProcess(p *process.Process, cmdline string, pc *PodContainer, entity *api.ProcessEntity) *Process
func (*Process) DetectType ¶
func (p *Process) DetectType() api.ProcessDetectType
func (*Process) Entity ¶
func (p *Process) Entity() *api.ProcessEntity
func (*Process) OriginalProcess ¶
func (*Process) ProfilingStat ¶
type ProcessBuilder ¶
type ProcessBuilder struct { Active bool `mapstructure:"active"` Filters []string `mapstructure:"filters"` Layer string `mapstructure:"layer"` ServiceName string `mapstructure:"service_name"` InstanceName string `mapstructure:"instance_name"` ProcessName string `mapstructure:"process_name"` LabelsStr string `mapstructure:"labels"` // runtime FiltersBuilder []*base.TemplateBuilder ServiceNameBuilder *base.TemplateBuilder InstanceNameBuilder *base.TemplateBuilder ProcessNameBuilder *base.TemplateBuilder Labels []string }
type ProcessFinder ¶
type ProcessFinder struct {
// contains filtered or unexported fields
}
func (*ProcessFinder) BuildEBPFProcess ¶
func (f *ProcessFinder) BuildEBPFProcess(ctx *base.BuildEBPFProcessContext, ps base.DetectedProcess) *v3.EBPFProcessProperties
func (*ProcessFinder) BuildNecessaryProperties ¶
func (f *ProcessFinder) BuildNecessaryProperties(ps base.DetectedProcess) []*commonv3.KeyStringValuePair
func (*ProcessFinder) DetectType ¶
func (f *ProcessFinder) DetectType() api.ProcessDetectType
func (*ProcessFinder) Init ¶
func (f *ProcessFinder) Init(ctx context.Context, conf base.FinderBaseConfig, manager base.ProcessManager) error
func (*ProcessFinder) ParseProcessID ¶
func (f *ProcessFinder) ParseProcessID(ps base.DetectedProcess, downstream *v3.EBPFProcessDownstream) string
func (*ProcessFinder) Start ¶
func (f *ProcessFinder) Start()
func (*ProcessFinder) Stop ¶
func (f *ProcessFinder) Stop() error
func (*ProcessFinder) ValidateProcessIsSame ¶
func (f *ProcessFinder) ValidateProcessIsSame(p1, p2 base.DetectedProcess) bool
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry(cli *kubernetes.Clientset, namespaces []string, nodeName string) *Registry
func (*Registry) BuildPodContainers ¶
func (r *Registry) BuildPodContainers() map[string]*PodContainer
func (*Registry) FindServiceName ¶
type TemplateContainer ¶
type TemplateContainer struct {
// contains filtered or unexported fields
}
func (*TemplateContainer) ID ¶
func (c *TemplateContainer) ID() string
func (*TemplateContainer) Name ¶
func (c *TemplateContainer) Name() string
type TemplatePod ¶
type TemplatePod struct {
// contains filtered or unexported fields
}
func (*TemplatePod) LabelValue ¶
func (p *TemplatePod) LabelValue(names string) (string, error)
func (*TemplatePod) Name ¶
func (p *TemplatePod) Name() string
func (*TemplatePod) Namespace ¶
func (p *TemplatePod) Namespace() string
func (*TemplatePod) Node ¶
func (p *TemplatePod) Node() string
func (*TemplatePod) ServiceName ¶
func (p *TemplatePod) ServiceName() string
type TemplatePodJudgment ¶
type TemplatePodJudgment struct {
*TemplatePod
}
func (*TemplatePodJudgment) HasContainer ¶
func (t *TemplatePodJudgment) HasContainer(name string) bool
func (*TemplatePodJudgment) HasServiceName ¶
func (t *TemplatePodJudgment) HasServiceName() bool
func (*TemplatePodJudgment) LabelSelector ¶
func (t *TemplatePodJudgment) LabelSelector(selector string) (bool, error)
Click to show internal directories.
Click to hide internal directories.