Link represents a Program attached to a BPF hook.
| 19 | |
| 20 | // Link represents a Program attached to a BPF hook. |
| 21 | type Link interface { |
| 22 | // Replace the current program with a new program. |
| 23 | // |
| 24 | // Passing a nil program is an error. May return an error wrapping ErrNotSupported. |
| 25 | Update(*ebpf.Program) error |
| 26 | |
| 27 | // Persist a link by pinning it into a bpffs. |
| 28 | // |
| 29 | // May return an error wrapping ErrNotSupported. |
| 30 | Pin(string) error |
| 31 | |
| 32 | // Undo a previous call to Pin. |
| 33 | // |
| 34 | // May return an error wrapping ErrNotSupported. |
| 35 | Unpin() error |
| 36 | |
| 37 | // Close frees resources. |
| 38 | // |
| 39 | // The link will be broken unless it has been successfully pinned. |
| 40 | // A link may continue past the lifetime of the process if Close is |
| 41 | // not called. |
| 42 | Close() error |
| 43 | |
| 44 | // Detach the link from its corresponding attachment point. |
| 45 | // |
| 46 | // May return an error wrapping ErrNotSupported. |
| 47 | Detach() error |
| 48 | |
| 49 | // Info returns metadata on a link. |
| 50 | // |
| 51 | // May return an error wrapping ErrNotSupported. |
| 52 | Info() (*Info, error) |
| 53 | |
| 54 | // Prevent external users from implementing this interface. |
| 55 | isLink() |
| 56 | } |
| 57 | |
| 58 | // NewFromFD creates a link from a raw fd. |
| 59 | // |
no outgoing calls
no test coverage detected
searching dependent graphs…