events

package
v0.0.0-...-3b46a80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRingBuffer

func InitRingBuffer(mapFDlist []int) (map[int]chan []byte, error)

Types

type Events

type Events struct {
	RingBuffers []*RingBuffer
	PageSize    int
	RingCnt     int
	// contains filtered or unexported fields
}

func (*Events) CleanupRingBuffer

func (ev *Events) CleanupRingBuffer()

func (*Events) ReadRingBuffer

func (ev *Events) ReadRingBuffer(eventRing *RingBuffer)

Similar to libbpf poll ring

func (*Events) SetupRingBuffer

func (ev *Events) SetupRingBuffer(mapFD int, maxEntries uint32) (chan []byte, error)

type RingBuffer

type RingBuffer struct {
	Consumerpos     unsafe.Pointer
	Consumer        []byte
	Producerpos     unsafe.Pointer
	Producer        []byte
	Mask            uint64
	RingBufferMapFD int
	Data            unsafe.Pointer
}

func (*RingBuffer) ParseRingData

func (r *RingBuffer) ParseRingData(consumerPosition uint64) *RingData

type RingData

type RingData struct {
	Data          *int32
	Len           uint32
	DataLen       uint32
	RecordLen     uint32
	BusyRecord    bool
	DiscardRecord bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL