feat(go): port socket detectors
This commit is contained in:
parent
fc9b5f0448
commit
c6f7219de8
23 changed files with 693 additions and 28 deletions
|
|
@ -19,9 +19,22 @@ type Process struct {
|
|||
// SystemState boundary.
|
||||
type State struct {
|
||||
Processes []Process `json:"processes"`
|
||||
Sockets []Socket `json:"sockets"`
|
||||
LDPreload string `json:"ld_preload"`
|
||||
}
|
||||
|
||||
// Socket matches the Python SystemState socket view. Nil inode/PID values
|
||||
// preserve ss records where ownership metadata is unavailable.
|
||||
type Socket struct {
|
||||
State string `json:"state"`
|
||||
Local string `json:"local"`
|
||||
Peer string `json:"peer"`
|
||||
Inode *int `json:"inode"`
|
||||
Comm string `json:"comm"`
|
||||
PID *int `json:"pid"`
|
||||
Kind string `json:"kind"`
|
||||
}
|
||||
|
||||
// Alert matches enodia.alert.v1.
|
||||
type Alert struct {
|
||||
SID int `json:"sid"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue