Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var OutputPresets = map[string][]string{
"sockets": {
"process.pid", "process.name", "process.user",
"socket.family", "socket.type", "socket.state",
"socket.srcAddr", "socket.srcPort", "socket.dstAddr", "socket.dstPort",
},
"files": {
"process.pid", "process.name", "process.user",
"file.fd", "file.fdType", "file.path",
},
"containers": {
"process.pid", "process.name", "process.user",
"container.name", "container.image", "container.runtime",
},
"network": {
"process.pid", "process.name",
"socket.type", "socket.state", "socket.srcPort", "socket.dstPort",
},
}
OutputPresets defines common output column combinations
Functions ¶
func ParseColumns ¶ added in v0.2.0
ParseColumns parses a comma-separated column specification Supports presets: "sockets", "files", "containers", "network"
func ValidateColumns ¶ added in v0.2.0
ValidateColumns checks if all column names are valid
Types ¶
type ColumnPrinter ¶ added in v0.2.0
type ColumnPrinter struct {
// contains filtered or unexported fields
}
ColumnPrinter prints match results with custom columns specified by -o flag
func NewColumnPrinter ¶ added in v0.2.0
func NewColumnPrinter(w io.Writer, bootTime time.Time, columnNames []string, _ bool) (*ColumnPrinter, error)
NewColumnPrinter creates a new column printer with the specified columns
func (*ColumnPrinter) HasFileColumns ¶ added in v0.2.0
func (p *ColumnPrinter) HasFileColumns() bool
HasFileColumns returns true if any column is from file/socket
func (*ColumnPrinter) Print ¶ added in v0.2.0
func (p *ColumnPrinter) Print(results []filter.MatchResult)
Print prints all match results with the configured columns
type PrintOption ¶
type PrintOption func(*Printer)
func WithColors ¶
func WithColors(colored bool) PrintOption
WithColors enables or disables colored output.
func WithContainers ¶
func WithContainers(mgr *containers.Manager) PrintOption
WithContainers sets the container manager for container labels.
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer handles table printing with various options.
func NewPrinter ¶
NewPrinter creates a new table Printer.
func (*Printer) PrintAll ¶
func (p *Printer) PrintAll(tasks []*unmarshal.TaskDescriptor)
PrintAll prints all tasks in a table.
func (*Printer) PrintLineage ¶
func (p *Printer) PrintLineage(tasks []*unmarshal.TaskDescriptor, lineagePids map[int32]bool)
PrintLineage prints all processes in the lineage of the specified PIDs.