util

package
v0.0.0-...-66ead01 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigMap = map[types.UID]*ConfigMapEntry{}
View Source
var DeletedPods = map[types.UID]chan PsPod{}
View Source
var NewPods = map[types.UID]chan PsPod{}
View Source
var Nodes = make(map[string]struct{})
View Source
var RestorePods = make(map[string]string)
View Source
var Restores = make(chan Restore)

Functions

func CombineLatest

func CombineLatest(deployment types.UID)

func CreatePod

func CreatePod(client client.Client, ctx context.Context, labelSelector *metav1.LabelSelector, notOnSameNode *v1.Pod)

func DeletePod

func DeletePod(c client.Client, ctx context.Context, pod *v1.Pod)

func GetDeletedPodsChannelFor

func GetDeletedPodsChannelFor(deployment types.UID) chan PsPod

func GetNewPodsChannelFor

func GetNewPodsChannelFor(deployment types.UID) chan PsPod

func GetPodsBySelector

func GetPodsBySelector(client client.Client, ctx context.Context, labelSelector *metav1.LabelSelector) ([]v1.Pod, error)

Types

type ConfigMapEntry

type ConfigMapEntry struct {
	Id            types.UID
	Mode          string
	LabelSelector *v12.LabelSelector
	StateProbe    Probe
	LivenessProbe Probe
	Pods          []*PsPod
}

type Probe

type Probe struct {
	Interval int
	Port     int
	Path     string
}

type PsPod

type PsPod struct {
	Uid          string
	Name         string
	Ip           string
	HostIp       string
	Restarts     int32
	Deleted      bool
	CurrentState []byte
	ContentType  string
	KRef         *v1.Pod
}

func FromPod

func FromPod(pod *v1.Pod) PsPod

type Restore

type Restore struct {
	FromPid string
	HostIp  string
	Ip      string
	Mode    string
	Path    string
	Port    int32
}

Jump to

Keyboard shortcuts

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