Documentation ¶
Index ¶
- func IsAPIError(err error) bool
- func NewAggregator(fallbackCache cache.Cache, gvkToCache map[schema.GroupVersionKind]cache.Cache, ...) cache.Cache
- func NewCacheError(err error) error
- func NewSingleObject(log logr.Logger, restConfig *rest.Config, newCache cache.NewCacheFunc, ...) cache.Cache
- type CacheError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAPIError ¶
IsAPIError checks if the given error is API related.
func NewAggregator ¶
func NewAggregator(fallbackCache cache.Cache, gvkToCache map[schema.GroupVersionKind]cache.Cache, scheme *runtime.Scheme) cache.Cache
NewAggregator creates a new instance of an aggregated cache.
func NewCacheError ¶
NewCacheError returns a new instance of `CacheError`.
func NewSingleObject ¶ added in v1.67.0
func NewSingleObject( log logr.Logger, restConfig *rest.Config, newCache cache.NewCacheFunc, opts cache.Options, gvk schema.GroupVersionKind, clock clock.Clock, maxIdleTime time.Duration, garbageCollectionInterval time.Duration, ) cache.Cache
NewSingleObject creates a new instance of the singleObject cache.Cache implementation. This cache maintains a separate cache per `client.ObjectKey` and invalidates them when not accessed for the given `maxIdleTime`. A new cache for a particular object is added or re-added as soon as the caches `Get()` function is invoked. Please note that object types are not differentiated by this cache (only object keys), i.e. it must not be used with mixed GVKs.
Types ¶
type CacheError ¶
type CacheError struct {
// contains filtered or unexported fields
}
CacheError is an error type indicating that an cache error occurred.
func (*CacheError) Error ¶
func (e *CacheError) Error() string
Error returns the error string with the underlying error.
func (*CacheError) Unwrap ¶
func (e *CacheError) Unwrap() error
Unwrap returns the next error in the error chain.