collection

package
v0.0.0-...-189669f Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupNamespace

func CleanupNamespace(ctx context.Context, client kubernetes.Interface, namespace string)

func CreateNamespace

func CreateNamespace(ctx context.Context, clientset kubernetes.Interface, name string) (*corev1.Namespace, error)

Types

type CollectionOptions

type CollectionOptions struct {
	Name      string
	Namespace string
	Image     string
	NodeName  string
	Command   string
}

type DefaultTracer

type DefaultTracer struct {
	Client     kubernetes.Interface
	RestConfig *rest.Config

	TracerPodSpec *corev1.PodSpec

	// Collection Defaults
	CollectionTimeout time.Duration
	OutputDirectory   string
	// contains filtered or unexported fields
}

func (*DefaultTracer) Cleanup

func (tracer *DefaultTracer) Cleanup()

Cleanup removes all up the collection trace

func (*DefaultTracer) StartCollection

func (tracer *DefaultTracer) StartCollection(iostreams *genericclioptions.IOStreams, command string) (int, error)

StartCollection runs the defined command within the tracer pod

type NodeTracer

type NodeTracer struct {
	DefaultTracer

	TargetNode *corev1.Node
}

func (*NodeTracer) Start

func (tracer *NodeTracer) Start(options CollectionOptions) error

type PodTracer

type PodTracer struct {
	DefaultTracer

	// Target Details
	TargetPod *corev1.Pod
	// contains filtered or unexported fields
}

func (*PodTracer) Start

func (tracer *PodTracer) Start(options CollectionOptions) error

Public function for starting the collection trace CollectionOptions.Command is used as a template Options: {target_pid}

type Tracer

type Tracer interface {
	Start(CollectionOptions) error
	Cleanup()
}

Jump to

Keyboard shortcuts

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