Documentation ¶
Overview ¶
Package recorder provides an agent API for managing datapath pcap recorders.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecorderMaskToModel ¶
func RecorderMaskToModel(rm *RecMask) *models.RecorderMaskSpec
func RecorderToModel ¶
func RecorderToModel(ri *RecInfo) (*models.RecorderSpec, error)
Types ¶
type RecInfo ¶
type RecInfo struct { ID ID CapLen uint16 Filters []RecorderTuple }
+k8s:deepcopy-gen=true
func ModelToRecorder ¶
func ModelToRecorder(mo *models.RecorderSpec) (*RecInfo, error)
func (*RecInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecInfo.
func (*RecInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RecMask ¶
type RecMask struct {
// contains filtered or unexported fields
}
+k8s:deepcopy-gen=true
func (*RecMask) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecMask.
func (*RecMask) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Recorder ¶
func NewRecorder ¶
NewRecorder initializes the main recorder infrastructure once upon agent bootstrap for tracking tuple insertions and masks that need to be pushed down into the BPF datapath. Given we currently do not support restore functionality, it also flushes prior existing recorder objects from the BPF maps.
func (*Recorder) DeleteRecorder ¶
DeleteRecorder will delete an existing recorder object based on its unique identifier. If needed, it will also update datapath maps to purge the recorder filters from the BPF maps as well as triggering a reinitialization of the XDP datapath if the mask set has changed.
func (*Recorder) RetrieveRecorder ¶
RetrieveRecorder will return an existing recorder object based on its unique identifier. The returned object is a deep copy of the original one tracked by the recorder infrastructure, so it can be freely changed without affecting the original recorder object.
func (*Recorder) RetrieveRecorderMaskSet ¶
RetrieveRecorderMaskSet will return a list of all existing recorder masks.
func (*Recorder) RetrieveRecorderSet ¶
RetrieveRecorderSet will return a list of all existing recorder objects.
func (*Recorder) UpsertRecorder ¶
UpsertRecorder will create a new or update an existing recorder object based on its unique identifier. If needed, it will also update datapath maps to insert new or remove obsolete recorder filters from the BPF maps as well as triggering a reinitialization of the XDP datapath if the mask set has changed.
type RecorderMask ¶
type RecorderMask struct {
// contains filtered or unexported fields
}
+k8s:deepcopy-gen=true
func (*RecorderMask) DeepCopy ¶
func (in *RecorderMask) DeepCopy() *RecorderMask
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecorderMask.
func (*RecorderMask) DeepCopyInto ¶
func (in *RecorderMask) DeepCopyInto(out *RecorderMask)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RecorderTuple ¶
type RecorderTuple struct { SrcPrefix cidr.CIDR SrcPort uint16 DstPrefix cidr.CIDR DstPort uint16 Proto u8proto.U8proto }
+k8s:deepcopy-gen=true
func (*RecorderTuple) DeepCopy ¶
func (in *RecorderTuple) DeepCopy() *RecorderTuple
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecorderTuple.
func (*RecorderTuple) DeepCopyInto ¶
func (in *RecorderTuple) DeepCopyInto(out *RecorderTuple)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.