Documentation ¶
Index ¶
- Constants
- func ReadMetaPayload(r io.Reader, meta *Meta, pl *Payload) error
- func WriteMetaPayload(w io.Writer, meta *Meta, pl *Payload) error
- type Meta
- type Payload
- func (pl *Payload) BuildMessage() ([]byte, error)
- func (pl *Payload) Decode(data []byte) error
- func (pl *Payload) DecodeBinary(dec *gob.Decoder) error
- func (pl *Payload) Encode() ([]byte, error)
- func (pl *Payload) EncodeBinary(enc *gob.Encoder) error
- func (pl *Payload) ReadBinary(r io.Reader) error
- func (pl *Payload) WriteBinary(w io.Writer) error
Constants ¶
const ( // EventSample is equivalent to PERF_RECORD_SAMPLE EventSample = 9 // RecordLost is equivalent to PERF_RECORD_LOST RecordLost = 2 )
Below constants are based on the ones from <linux/perf_event.h>.
Variables ¶
This section is empty.
Functions ¶
func ReadMetaPayload ¶ added in v1.5.0
ReadMetaPayload reads a Meta and Payload from a Cilium monitor connection.
Types ¶
type Meta ¶
type Meta struct { Size uint32 // contains filtered or unexported fields }
Meta is used by readers to get information about the payload.
func (*Meta) MarshalBinary ¶
MarshalBinary encodes the metadata into its binary representation.
func (*Meta) ReadBinary ¶
ReadBinary reads the metadata from its binary representation.
func (*Meta) UnmarshalBinary ¶
UnmarshalBinary decodes the metadata from its binary representation.
type Payload ¶
Payload is the structure used when copying events from the main monitor.
func (*Payload) BuildMessage ¶ added in v1.5.0
BuildMessage builds the binary message to be sent and returns it
func (*Payload) DecodeBinary ¶
DecodeBinary reads the payload from its binary representation.
func (*Payload) EncodeBinary ¶
EncodeBinary writes the payload into its binary representation.
func (*Payload) ReadBinary ¶
ReadBinary reads the payload from its binary representation.