kubernetes/pkg/kubelet/container/cache.go

type Cache

type data

type subRecord

type cache

// NewCache creates a pod cache.
func NewCache() Cache {}

// Get returns the PodStatus for the pod; callers are expected not to
// modify the objects returned.
func (c *cache) Get(id types.UID) (*PodStatus, error) {}

func (c *cache) GetNewerThan(id types.UID, minTime time.Time) (*PodStatus, error) {}

// Set sets the PodStatus for the pod only if the data is newer than the cache
func (c *cache) Set(id types.UID, status *PodStatus, err error, timestamp time.Time) (updated bool) {}

// Delete removes the entry of the pod.
func (c *cache) Delete(id types.UID) {}

// UpdateTime modifies the global timestamp of the cache and notify
// subscribers if needed.
func (c *cache) UpdateTime(timestamp time.Time) {}

func makeDefaultData(id types.UID) *data {}

func (c *cache) get(id types.UID) *data {}

// getIfNewerThan returns the data it is newer than the given time.
// Otherwise, it returns nil. The caller should acquire the lock.
func (c *cache) getIfNewerThan(id types.UID, minTime time.Time) *data {}

// notify sends notifications for pod with the given id, if the requirements
// are met. Note that the caller should acquire the lock.
func (c *cache) notify(id types.UID, timestamp time.Time) {}

func (c *cache) subscribe(id types.UID, timestamp time.Time) chan *data {}