kubernetes

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 22 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 NewCreator

func NewCreator(clientSet kubernetes.Interface) *creator

NewCreator returns new implementation of Creator

func NewDeleter

func NewDeleter(clientSet kubernetes.Interface) *deleter

NewDeleter returns new implementation of Deleter

func NewGetter

func NewGetter(kubeContext KubeContext) *getter

NewGetter returns new implementation of Getter

func ToContainerId

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

Types

type ConnectionContext added in v0.4.0

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
}

type EventHandler

type EventHandler interface {
	Handle(events chan string, done chan bool, resultFileName chan string)
}

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 string, error)
	GetRemoteFile(pod *apiv1.Pod, remoteFileName string, localFileName string, compressor api.Compressor) error
}

type KubeContext added in v0.7.0

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