session

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sSession

type K8sSession struct {
	Clients        *client.Clients
	Cache          *resources.Cache
	Cancel         context.CancelFunc
	CurrentCtx     string
	CurrentCluster string
	Status         chan string
	InCluster      bool
	// contains filtered or unexported fields
}

func CreateK8sSession

func CreateK8sSession() (*K8sSession, error)

CreateK8sSession creates a new k8s session

func (*K8sSession) HandleReconnection

func (ks *K8sSession) HandleReconnection()

HandleReconnection infinitely retries to re-create the client and cache of the formerly connected cluster

func (*K8sSession) ServeConnStatus

func (ks *K8sSession) ServeConnStatus() http.HandlerFunc

ServeConnStatus returns a handler function that streams the connection status to the client

func (*K8sSession) StartClusterMonitoring

func (ks *K8sSession) StartClusterMonitoring()

StartClusterMonitoring is a goroutine that checks the connection to the cluster

func (*K8sSession) Switch added in v0.9.0

func (ks *K8sSession) Switch() http.HandlerFunc

Switch returns a handler function that switches the current cluster and updates the K8sSession

Jump to

Keyboard shortcuts

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