Documentation ¶
Index ¶
- Constants
- type CacheError
- type PodCache
- type VicPodCache
- func (v *VicPodCache) Add(op trace.Operation, namespace, name string, pod *vicpod.VicPod) error
- func (v *VicPodCache) Delete(op trace.Operation, namespace, name string) error
- func (v *VicPodCache) Get(op trace.Operation, namespace, name string) (*vicpod.VicPod, error)
- func (v *VicPodCache) GetAll(op trace.Operation) []*vicpod.VicPod
- func (v *VicPodCache) Rehydrate(op trace.Operation) error
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 ¶
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 ¶
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
Click to show internal directories.
Click to hide internal directories.