Documentation
¶
Overview ¶
Package capture contains functions related to handling Retina/Capture.
Index ¶
- func TestContext(t *testing.T) (context.Context, context.CancelFunc)
- type CaptureJobNumExceedLimitError
- type CaptureManager
- type CaptureTarget
- type CaptureTargetsOnNode
- type CaptureToPodTranslator
- func (translator *CaptureToPodTranslator) CalculateCaptureTargetsOnNode(ctx context.Context, captureTarget retinav1alpha1.CaptureTarget) (*CaptureTargetsOnNode, error)
- func (translator *CaptureToPodTranslator) ObtainCaptureJobPodEnv(capture retinav1alpha1.Capture) (map[string]string, error)
- func (translator *CaptureToPodTranslator) TranslateCaptureToJobs(ctx context.Context, capture *retinav1alpha1.Capture) ([]*batchv1.Job, error)
- type SecretNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestContext ¶ added in v0.0.26
Types ¶
type CaptureJobNumExceedLimitError ¶
func (CaptureJobNumExceedLimitError) Error ¶
func (err CaptureJobNumExceedLimitError) Error() string
type CaptureManager ¶
type CaptureManager struct {
// contains filtered or unexported fields
}
CaptureManager captures network packets and metadata into tar ball, then send the tar ball to the location(s) specified by users.
func NewCaptureManager ¶
func NewCaptureManager(logger *log.ZapLogger, tel telemetry.Telemetry) *CaptureManager
func (*CaptureManager) CaptureNetwork ¶
func (cm *CaptureManager) CaptureNetwork(ctx context.Context) (string, error)
func (*CaptureManager) Cleanup ¶
func (cm *CaptureManager) Cleanup() error
func (*CaptureManager) OutputCapture ¶
func (cm *CaptureManager) OutputCapture(ctx context.Context, srcDir string) error
type CaptureTarget ¶
type CaptureTarget struct { // PodIpAddresses indicates the capture is performed on the Pods per their IP addresses. PodIpAddresses []string // CaptureNodeInterface indicates the capture is performed on the host node interface. CaptureNodeInterface bool // OS indicates the operating system of the node hosting the target. OS string }
CaptureTarget indicates on which the network capture will be performed on a given node.
type CaptureTargetsOnNode ¶
type CaptureTargetsOnNode map[string]CaptureTarget
CaptureTargetsOnNode maps nodes to the targets network capture will be performed. On each node, the network capture can be done on either Pod hosted in the node, or the node interface itself. When multiple nodes are selected per capture configuration, there'll be multiple jobs created per node.
func (CaptureTargetsOnNode) AddNodeInterface ¶
func (cton CaptureTargetsOnNode) AddNodeInterface(hostname string)
func (CaptureTargetsOnNode) AddPod ¶
func (cton CaptureTargetsOnNode) AddPod(hostname string, ipAddresses []string)
func (CaptureTargetsOnNode) UpdateNodeOS ¶
func (cton CaptureTargetsOnNode) UpdateNodeOS(hostname string, os string)
type CaptureToPodTranslator ¶
type CaptureToPodTranslator struct { // Apiserver is unique identifier to identify the cluster in the trace capture. Apiserver string // contains filtered or unexported fields }
CaptureToPodTranslator translate the Capture object to a Job.
func NewCaptureToPodTranslator ¶
func NewCaptureToPodTranslator(kubeClient kubernetes.Interface, logger *log.ZapLogger, config config.CaptureConfig) *CaptureToPodTranslator
NewCaptureToPodTranslator initializes a CaptureToPodTranslator.
func (*CaptureToPodTranslator) CalculateCaptureTargetsOnNode ¶
func (translator *CaptureToPodTranslator) CalculateCaptureTargetsOnNode(ctx context.Context, captureTarget retinav1alpha1.CaptureTarget) (*CaptureTargetsOnNode, error)
CalculateCaptureTargetsOnNode returns capture target on each node.
func (*CaptureToPodTranslator) ObtainCaptureJobPodEnv ¶
func (translator *CaptureToPodTranslator) ObtainCaptureJobPodEnv(capture retinav1alpha1.Capture) (map[string]string, error)
ObtainCaptureJobPodEnv translates Capture object to Environment variables to capture job Pod.
func (*CaptureToPodTranslator) TranslateCaptureToJobs ¶
func (translator *CaptureToPodTranslator) TranslateCaptureToJobs(ctx context.Context, capture *retinav1alpha1.Capture) ([]*batchv1.Job, error)
type SecretNotFoundError ¶
func (SecretNotFoundError) Error ¶
func (err SecretNotFoundError) Error() string
Directories
¶
Path | Synopsis |
---|---|
managed
managed package provides the functionality to manage the output locations for the Capture.
|
managed package provides the functionality to manage the output locations for the Capture. |
Package provider is a generated GoMock package.
|
Package provider is a generated GoMock package. |