kubernetes

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnector

func NewConnector() *connector

NewConnector returns new implementation of Connector

func ToContainerId

func ToContainerId(containerName string, pod *apiv1.Pod) (string, error)

Types

type ConnectionContext

type ConnectionContext struct {
	KubeContext
	Namespace string
}

type Connector

type Connector interface {
	Connect(clientGetter genericclioptions.RESTClientGetter) (kubernetes.Interface, string, error)
}

type Creator

type Creator interface {
	CreateProfilingJob(*v1.Pod, *config.ProfilerConfig, context.Context) (string, *batchv1.Job, error)
}

type Deleter

type Deleter interface {
	DeleteProfilingJob(*batchv1.Job, context.Context) error
}

func NewDeleter

func NewDeleter(clientSet kubernetes.Interface) Deleter

NewDeleter returns new implementation of Deleter

type EventHandler

type EventHandler interface {
	Handle(events chan string, done chan bool, resultFile chan result.File)
}

type Getter

type Getter interface {
	GetPod(podName, namespace string, ctx context.Context) (*apiv1.Pod, error)
	GetProfilingPod(cfg *config.ProfilerConfig, ctx context.Context) (*apiv1.Pod, error)
	GetPodLogs(pod *apiv1.Pod, handler EventHandler, ctx context.Context) (chan bool, chan result.File, error)
	GetRemoteFile(pod *apiv1.Pod, remoteFile result.File, localFileName string, compressor compressor.Type) (string, error)
}

func NewGetter

func NewGetter(kubeContext KubeContext) Getter

NewGetter returns new implementation of Getter

type JobCreator

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

func NewJobCreator

func NewJobCreator(clientSet kubernetes.Interface) *JobCreator

NewJobCreator returns new implementation of Creator

func (JobCreator) CreateProfilingJob

func (c JobCreator) CreateProfilingJob(targetPod *v1.Pod, cfg *config.ProfilerConfig, ctx context.Context) (string, *batchv1.Job, error)

type KubeContext

type KubeContext struct {
	ClientSet  kubernetes.Interface
	RestConfig *rest.Config
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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