resource

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	// contains filtered or unexported fields
}

func NewContainer

func NewContainer(logger *slog.Logger, criClient criapi.RuntimeService) *Container

func (*Container) GetPidFromContainerID

func (c *Container) GetPidFromContainerID(ctx context.Context, containerID string) (int, error)

GetPidFromContainerID returns the pid of the container

type Discovery

type Discovery struct {
	// contains filtered or unexported fields
}

func NewDiscovery

func NewDiscovery(logger *slog.Logger, client client.Client) (*Discovery, error)

func (*Discovery) DiscoveryServerAddr

func (d *Discovery) DiscoveryServerAddr(pods *corev1.PodList, hostIP string) (string, error)

func (*Discovery) GetContainerID

func (d *Discovery) GetContainerID(pod *corev1.Pod, containerName string) (string, error)

func (*Discovery) GetPod

func (d *Discovery) GetPod(ctx context.Context, namespace, podName string) (*corev1.Pod, error)

func (*Discovery) GetPodList

func (d *Discovery) GetPodList(ctx context.Context, necoperfNS string) (*corev1.PodList, error)

type PerfExecuter

type PerfExecuter struct {
	// contains filtered or unexported fields
}

func NewPerfExecuter

func NewPerfExecuter(logger *slog.Logger) (*PerfExecuter, error)

func (*PerfExecuter) ExecRecord

func (p *PerfExecuter) ExecRecord(ctx context.Context, workDir string, pid int, timeout time.Duration) (string, error)

func (*PerfExecuter) ExecScript

func (p *PerfExecuter) ExecScript(ctx context.Context, path, workDir string) (string, error)

func (*PerfExecuter) GetEvent

func (p *PerfExecuter) GetEvent(ctx context.Context, path string) (*bytes.Buffer, error)

func (*PerfExecuter) HasPerfEvent

func (p *PerfExecuter) HasPerfEvent(ctx context.Context, buf *bytes.Buffer) bool

Check if events are contained in the perf.data file.

Jump to

Keyboard shortcuts

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