cache

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodCachePodNameError = CacheError("PodCache called with empty pod name")
	PodCacheNilPodError  = CacheError("PodCache called with nil pod")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheError

type CacheError string

func (CacheError) Error

func (c CacheError) Error() string

type PodCache

type PodCache interface {
	Rehydrate(op trace.Operation) error
	Get(op trace.Operation, namespace, name string) (*vicpod.VicPod, error)
	GetAll(op trace.Operation) []*vicpod.VicPod
	Add(op trace.Operation, namespace, name string, pod *vicpod.VicPod) error
	Delete(op trace.Operation, namespace, name string) error
}

func NewVicPodCache

func NewVicPodCache() PodCache

type VicPodCache

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

func (*VicPodCache) Add

func (v *VicPodCache) Add(op trace.Operation, namespace, name string, pod *vicpod.VicPod) error

Add saves the pod definition of a running pod

arguments:

op			operation trace logger
namespace	namespace of the pod.  Empty namespace assumes default.
name		name of the pod
pod			pod definition

returns:

error

func (*VicPodCache) Delete

func (v *VicPodCache) Delete(op trace.Operation, namespace, name string) error

Delete removes a pod definition from the cache. It does not stop/delete the

actual pod.

arguments:

op			operation trace logger
namespace	namespace of the pod.  Empty namespace assumes default.
name		name of the pod

returns:

error

func (*VicPodCache) Get

func (v *VicPodCache) Get(op trace.Operation, namespace, name string) (*vicpod.VicPod, error)

Get returns the pod definition for a running pod

arguments:

op			operation trace logger
namespace	namespace of the pod.  Empty namespace assumes default.
name		name of the pod

returns:

error

func (*VicPodCache) GetAll

func (v *VicPodCache) GetAll(op trace.Operation) []*vicpod.VicPod

GetAll returns the pod definitions for all running pods

arguments:

op			operation trace logger

returns:

error

func (*VicPodCache) Rehydrate

func (v *VicPodCache) Rehydrate(op trace.Operation) error

Rehydrate replenishes the cache in the event of a virtual kubelet restart.

NOT YET IMPLEMENTED

arguments:

op		operation trace logger

returns:

error

Jump to

Keyboard shortcuts

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