var ( ErrClosed = os.ErrClosed )
Reader allows reading bpf_ringbuf_output from user space.
type Reader struct {
// contains filtered or unexported fields
}
func NewReader(ringbufMap *ebpf.Map) (*Reader, error)
NewReader creates a new BPF ringbuf reader.
func (r *Reader) Close() error
Close frees resources used by the reader.
It interrupts calls to Read.
func (r *Reader) Read() (Record, error)
Read the next record from the BPF ringbuf.
Calling Close interrupts the function.
func (r *Reader) ReadInto(rec *Record) error
ReadInto is like Read except that it allows reusing Record and associated buffers.
type Record struct { RawSample []byte }