summaryrefslogtreecommitdiff
path: root/internal/event/pair.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-26 10:37:40 +0200
committerPaul Buetow <paul@buetow.org>2026-02-26 10:37:40 +0200
commit4302cbf28a9d9efd2416ab6ea95168f9e39c29ec (patch)
tree90e4dfb2f9cc71e483396c3465859d1282282348 /internal/event/pair.go
parentc661b23f2940e07a1e1cbe16334598d999096f27 (diff)
tui: add fd trace drilldown and fd column in stream
Diffstat (limited to 'internal/event/pair.go')
-rw-r--r--internal/event/pair.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/event/pair.go b/internal/event/pair.go
index 28b553d..b6dc80c 100644
--- a/internal/event/pair.go
+++ b/internal/event/pair.go
@@ -102,6 +102,17 @@ func (e *Pair) FileName() string {
return e.File.Name()
}
+func (e *Pair) FileDescriptor() (int32, bool) {
+ if e.File == nil {
+ return 0, false
+ }
+ fd := e.File.FD()
+ if fd < 0 {
+ return 0, false
+ }
+ return fd, true
+}
+
func (e *Pair) Dump() string {
return fmt.Sprintf("%v with enterEv(%v) and exitEv(%v)", e, e.EnterEv, e.ExitEv)
}