terminal

package
v0.0.0-...-10da5ee Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyCode

type KeyCode struct {
	Key  string `json:"key"`
	Cols int    `json:"cols"`
	Rows int    `json:"rows"`
}

KeyCode - JSON object that is passed from the front-end to notify of a key press or a term resize

type KubeTerminal

type KubeTerminal struct {
	PortalProxy jetstream_api.PortalProxy
	Namespace   string `configName:"STRATOS_KUBERNETES_NAMESPACE"`
	Image       string `configName:"STRATOS_KUBERNETES_TERMINAL_IMAGE"`
	Token       []byte
	APIServer   string
	Kube        api.Kubernetes
}

KubeTerminal supports spawning pods to provide a CLI environment to the user

func NewKubeTerminal

func NewKubeTerminal(p jetstream_api.PortalProxy) *KubeTerminal

NewKubeTerminal checks that the environment is set up to support the Kube Terminal

func (*KubeTerminal) Start

func (k *KubeTerminal) Start(c echo.Context) error

Start handles web-socket request to launch a Kubernetes Terminal

func (*KubeTerminal) StartCleanup

func (k *KubeTerminal) StartCleanup()

StartCleanup starts a background routine to cleanup orphaned pods

type PodCreationData

type PodCreationData struct {
	Namespace    string
	PodClient    corev1.PodInterface
	SecretClient corev1.SecretInterface
	PodName      string
	SecretName   string
}

PodCreationData stores the clients and names used to create pod and secret

Jump to

Keyboard shortcuts

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