Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Get(types.UID) (*PodStatus, error) // Set updates the cache by setting the PodStatus for the pod only // if the data is newer than the cache based on the provided // time stamp. Returns if the cache was updated. Set(types.UID, *PodStatus, error, time.Time) (updated bool) // GetNewerThan is a blocking call that only returns the status // when it is newer than the given time. GetNewerThan(types.UID, time.Time) (*PodStatus, error) Delete(types.UID) UpdateTime(time.Time) }
Cache stores the PodStatus for the pods. It represents *all* the visible pods/containers in the container runtime. All cache entries are at least as new or newer than the global timestamp (set by UpdateTime()), while individual entries may be slightly newer than the global timestamp. If a pod has no states known by the runtime, Cache returns an empty PodStatus object with ID populated.
Cache provides two methods to retrieve the PodStatus: the non-blocking Get() and the blocking GetNewerThan() method. The component responsible for populating the cache is expected to call Delete() to explicitly free the cache entries.
Click to show internal directories.
Click to hide internal directories.