type ReasonCache … type ReasonItem … const maxReasonCacheEntries … // NewReasonCache creates an instance of 'ReasonCache'. func NewReasonCache() *ReasonCache { … } func (c *ReasonCache) composeKey(uid types.UID, name string) string { … } // add adds error reason into the cache func (c *ReasonCache) add(uid types.UID, name string, reason error, message string) { … } // Update updates the reason cache with the SyncPodResult. Only SyncResult with // StartContainer action will change the cache. func (c *ReasonCache) Update(uid types.UID, result kubecontainer.PodSyncResult) { … } // Remove removes error reason from the cache func (c *ReasonCache) Remove(uid types.UID, name string) { … } // Get gets error reason from the cache. The return values are error reason, error message and // whether an error reason is found in the cache. If no error reason is found, empty string will // be returned for error reason and error message. func (c *ReasonCache) Get(uid types.UID, name string) (*ReasonItem, bool) { … }