pod

package
v0.0.0-...-71b87c0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListNetnsIDs

func ListNetnsIDs(dir string) (map[string]int, error)

ListNetnsIDs returns the NetNS IDs for each namespace listed inside dir.

Types

type Metadata

type Metadata struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

Metadata holds a pod's metadata.

type Namespace

type Namespace struct {
	Type string `json:"type"`
	Path string `json:"path"`
}

type Pod

type Pod struct {
	ID       string   `json:"id"`
	Metadata Metadata `json:"metadata"`
}

Pod is a pod object.

func GetOwnerOfLink(link netlink.Link) (*Pod, error)

GetOwnerOfLink returns the Pod for the provided link.

type PodInspect

type PodInspect struct {
	Info struct {
		RuntimeSpec struct {
			Linux struct {
				Namespaces []Namespace `json:"namespaces"`
			} `json:"linux"`
		} `json:"runtimeSpec"`
	} `json:"info"`
}

func (PodInspect) GetNetns

func (p PodInspect) GetNetns() string

GetNetns returns the netns (only the name, without the full path) of this pod.

type PodList

type PodList struct {
	Items []Pod `json:"items"`
}

PodList is a list of Pods.

Jump to

Keyboard shortcuts

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