kube

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexIPOrName = "idx"
)

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(kubeConfigPath string) (*rest.Config, error)

Types

type Info

type Info struct {
	// Informers need that internal object is an ObjectMeta instance
	metav1.ObjectMeta
	Type string
	// contains filtered or unexported fields
}

Info contains precollected metadata for Pods, Nodes and Services. Not all the fields are populated for all the above types. To save memory, we just keep in memory the necessary data for each Type. For more information about which fields are set for each type, please refer to the instantiation function of the respective informers.

type Metadata

type Metadata struct {
	// contains filtered or unexported fields
}

Metadata stores an in-memory copy of the different Kubernetes objects whose metadata is relevant to us.

func (*Metadata) GetInfo

func (k *Metadata) GetInfo(ipOrName string) (*Info, bool)

GetInfo fetches metadata from Pod, Service given its IP or Service Name

func (*Metadata) InitFromConfig

func (k *Metadata) InitFromConfig(kubeConfigPath string, timeout time.Duration) error

Jump to

Keyboard shortcuts

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