kube

package
v0.0.0-...-ff67224 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Endpoints = safe.NewSortedMap(map[string]*Endpoint{}, func(data []string, i, j int) bool {
	return data[i] < data[j]
})
View Source
var (
	// pod map key=namespace
	Map = safe.NewSortedMap(map[string]*safe.SortedMap[string, *Pod]{}, func(data []string, i, j int) bool {
		return data[i] < data[j]
	})
)
View Source
var Services = safe.NewSortedMap(map[string]*safe.SortedMap[string, *Service]{}, func(data []string, i, j int) bool {
	return data[i] < data[j]
})

Functions

func Connect

func Connect(configName string)

func DeleteEndpoint

func DeleteEndpoint(name string)

func UpdateMap

func UpdateMap(notify chan any)

func UpdateServiceMap

func UpdateServiceMap(notify chan any)

Types

type ClientS

type ClientS struct {
	Config  *restclient.Config
	API     *kubernetes.Clientset
	CRD     crd.Client
	CTX     context.Context
	Metrics *metricsv.Clientset

	IngressOldVersion bool
}

ClientS ...

var (
	Client *ClientS
)

type Endpoint

type Endpoint struct {
	Name      string
	Namespace string
	KubePort  int
	HostPort  int
	Addr      string
}

func (Endpoint) CheckServiceExists

func (end Endpoint) CheckServiceExists() bool

func (*Endpoint) CreateService

func (end *Endpoint) CreateService() error

type MapUpdateMsg

type MapUpdateMsg struct{}

type Pod

type Pod struct {
	PFs       []*PortForwardA
	Name      string
	Namespace string
	OwnerName string
	Status    string
	IP        string
	Ports     []string
}

type PortForwardA

type PortForwardA struct {
	KubeClient *ClientS

	Name        string
	ServiceName string
	Namespace   string
	LocalPort   int
	// KubePort is the target port for the pod
	KubePort  int
	Resource  string
	Condition bool
	OwnerName string

	Notify chan any
	// contains filtered or unexported fields
}

func (*PortForwardA) Close

func (pf *PortForwardA) Close()

func (*PortForwardA) Copy

func (pf *PortForwardA) Copy() *PortForwardA

func (*PortForwardA) Forward

func (pf *PortForwardA) Forward()

func (*PortForwardA) Ready

func (pf *PortForwardA) Ready()

type Service

type Service struct {
	Name      string
	Namespace string
	Ports     []string
	PFs       []*PortForwardA
}

Jump to

Keyboard shortcuts

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