pod

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMirrorPod

func IsMirrorPod(pod *api.Pod) bool

func IsStaticPod

func IsStaticPod(pod *api.Pod) bool

Types

type FakeMirrorClient

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

func NewFakeMirrorClient

func NewFakeMirrorClient() *FakeMirrorClient

func (*FakeMirrorClient) CreateMirrorPod

func (fmc *FakeMirrorClient) CreateMirrorPod(pod *api.Pod) error

func (*FakeMirrorClient) DeleteMirrorPod

func (fmc *FakeMirrorClient) DeleteMirrorPod(podFullName string) error

func (*FakeMirrorClient) GetCounts

func (fmc *FakeMirrorClient) GetCounts(podFullName string) (int, int)

func (*FakeMirrorClient) GetPods

func (fmc *FakeMirrorClient) GetPods() []string

func (*FakeMirrorClient) HasPod

func (fmc *FakeMirrorClient) HasPod(podFullName string) bool

func (*FakeMirrorClient) NumOfPods

func (fmc *FakeMirrorClient) NumOfPods() int

type Manager

type Manager interface {
	GetPods() []*api.Pod
	GetPodByFullName(podFullName string) (*api.Pod, bool)
	GetPodByName(namespace, name string) (*api.Pod, bool)
	GetPodByUID(types.UID) (*api.Pod, bool)
	GetPodByMirrorPod(*api.Pod) (*api.Pod, bool)
	GetMirrorPodByPod(*api.Pod) (*api.Pod, bool)
	GetPodsAndMirrorPods() ([]*api.Pod, []*api.Pod)

	// SetPods replaces the internal pods with the new pods.
	// It is currently only used for testing.
	SetPods(pods []*api.Pod)

	// Methods that modify a single pod.
	AddPod(pod *api.Pod)
	UpdatePod(pod *api.Pod)
	DeletePod(pod *api.Pod)

	DeleteOrphanedMirrorPods()
	TranslatePodUID(uid types.UID) types.UID
	GetUIDTranslations() (podToMirror, mirrorToPod map[types.UID]types.UID)
	IsMirrorPodOf(mirrorPod, pod *api.Pod) bool
	MirrorClient
}

func NewBasicPodManager

func NewBasicPodManager(client MirrorClient) Manager

type MirrorClient

type MirrorClient interface {
	CreateMirrorPod(*api.Pod) error
	DeleteMirrorPod(string) error
}

Mirror client is used to create/delete a mirror pod.

func NewBasicMirrorClient

func NewBasicMirrorClient(apiserverClient client.Interface) MirrorClient

Jump to

Keyboard shortcuts

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