podmanager

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package podmanager contains the pod manager interface and a simple thread safe map-based implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodManager

type PodManager interface {
	// GetPodByName returns the pod identified by the namespace and name given in the parameters.
	GetPodByName(namespace string, name string) (*corev1.Pod, bool)

	// GetPodByUID returns the pod identified by the uid given in the `uid` parameter.
	GetPodByUID(uid types.UID) (*corev1.Pod, bool)

	// AddPod adds the pod specified in the `pod` parameter.
	AddPod(pod *corev1.Pod)

	// DeletePod deletes the pod specified in the `pod` parameter.
	DeletePod(pod *corev1.Pod)

	// DeletePod deletes the pod identified by the namespace and name given in the parameters.
	DeletePodByName(namespace string, name string)

	// GetAllPods returns an array of all pods.
	GetAllPods() (ret []*corev1.Pod)
}

PodManager provides an opaque interface for thread safe fast pod mangement

func New

func New() PodManager

New creates a new PodManager fully initialised

Directories

Path Synopsis
Package mock_podmanager is a generated GoMock package.
Package mock_podmanager is a generated GoMock package.

Jump to

Keyboard shortcuts

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