Replies: 2 comments 2 replies
-
I'm not sure I understand the purpose of this request. |
Beta Was this translation helpful? Give feedback.
-
Initially it would just be to check if there are any links in a program, like this: if len(BPFProg.GetModule().Links()) == 0 {
// Can close the the Program or the Module
}
That's what we're doing, duplicating the references and the maintenance logic: https://github.com/kubearmor/KubeArmor/blob/event-auditor/KubeArmor/eventAuditor/ebpfManager.go
I got your point about the internal use and possible changes.
Along with my initial example, we're also thinking about detaching links in the future: #66 Let's say that the consumer wants to detach all the links of a Module keeping the respective programs in memory : for l := range Module.Links() {
l.Detach()
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently
Module
structure maintainslinks
slice but keeping it private to the lib.https://github.com/aquasecurity/libbpfgo/blob/main/libbpfgo.go#L213-L218
How about to make it public so other implementations could make use of them directly?
I mean I'm on an implementation like this:
I'm having to keep track of the data that is already inside the lbpf.KABPFObject (libbpfgo.Module wrapper).
It can be make public from a
Module.Links()
.Beta Was this translation helpful? Give feedback.
All reactions