usecase

package
v0.0.0-...-d661a11 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sInClusterUsecase

type K8sInClusterUsecase interface {
	GetConfig() *rest.Config
	GetClientSet() *kubernetes.Clientset
}

func NewK8sInClusterUsecase

func NewK8sInClusterUsecase() (K8sInClusterUsecase, error)

type PodUsecase

type PodUsecase interface {
	GetCurrentPod() (*corev1.Pod, error)
	GetContainerInCurrentPod(targetContainerName string) (*corev1.Container, error)
}

func NewPodUsecase

func NewPodUsecase(
	ctx context.Context,
	k8sUsecase K8sInClusterUsecase,
) (PodUsecase, error)

type SshUsecase

type SshUsecase interface {
	StartSshServer4ContainerShell(cri pod.CRI, cmd string) error
	Shutdown() error
}

func NewSshUsecase

func NewSshUsecase(
	port string,
	ctx context.Context,
	publicKey gossh.PublicKey,
	k8sUsecase K8sInClusterUsecase,
) (SshUsecase, error)

Jump to

Keyboard shortcuts

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