diff options
Diffstat (limited to 'internal/eventloop.go')
| -rw-r--r-- | internal/eventloop.go | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/internal/eventloop.go b/internal/eventloop.go index 765345d..6163ebf 100644 --- a/internal/eventloop.go +++ b/internal/eventloop.go @@ -10,13 +10,12 @@ import ( bpf "github.com/aquasecurity/libbpfgo" ) -type openFile struct { - fd int32 - path string -} - -func (o openFile) String() string { - return fmt.Sprintf("(%d) %s", o.fd, o.path) +func eventLoop(bpfModule *bpf.Module, rawCh <-chan []byte) { + for ev := range events(rawCh) { + fmt.Println(ev) + ev.recycle() + } + fmt.Println("Good bye") } func events(rawCh <-chan []byte) <-chan enterExitEvent { @@ -64,12 +63,3 @@ func events(rawCh <-chan []byte) <-chan enterExitEvent { return evCh } - -func eventLoop(bpfModule *bpf.Module, rawCh <-chan []byte) { - for ev := range events(rawCh) { - fmt.Println(ev.dump()) - ev.recycle() - } - - fmt.Println("Good bye") -} |
