Documentation
¶
Index ¶
- Variables
- func AddCacheFlagsToCmd(cmd *cobra.Command, opts ...cacheutil.Options) func() (*Cache, error)
- type Cache
- func (c *Cache) GetAppManagedResources(appName string, res *[]*appv1.ResourceDiff) error
- func (c *Cache) GetAppResourcesTree(appName string, res *appv1.ApplicationTree) error
- func (c *Cache) GetClusterInfo(server string, res *appv1.ClusterInfo) error
- func (c *Cache) GetItem(key string, item any) error
- func (c *Cache) InvalidateAppLocalState(appName string)
- func (c *Cache) OnAppResourcesTreeChanged(ctx context.Context, appName string, callback func() error) error
- func (c *Cache) SetAppManagedResources(appName string, managedResources []*appv1.ResourceDiff) error
- func (c *Cache) SetAppResourcesTree(appName string, resourcesTree *appv1.ApplicationTree) error
- func (c *Cache) SetClusterInfo(server string, info *appv1.ClusterInfo) error
- func (c *Cache) SetItem(key string, item any, expiration time.Duration, deletion bool) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCacheMiss = cacheutil.ErrCacheMiss
)
Functions ¶
Types ¶
type Cache ¶
func (*Cache) GetAppManagedResources ¶
func (c *Cache) GetAppManagedResources(appName string, res *[]*appv1.ResourceDiff) error
func (*Cache) GetAppResourcesTree ¶
func (c *Cache) GetAppResourcesTree(appName string, res *appv1.ApplicationTree) error
func (*Cache) GetClusterInfo ¶
func (c *Cache) GetClusterInfo(server string, res *appv1.ClusterInfo) error
func (*Cache) InvalidateAppLocalState ¶ added in v3.5.7
InvalidateAppLocalState drops this controller's in-memory copies of the app's managed resources and resource tree, so the next write always reaches the external cache. Call it when another controller may have written these keys since this one last did, e.g. when the app's destination moves to a cluster managed by this controller.
func (*Cache) OnAppResourcesTreeChanged ¶
func (*Cache) SetAppManagedResources ¶
func (c *Cache) SetAppManagedResources(appName string, managedResources []*appv1.ResourceDiff) error
func (*Cache) SetAppResourcesTree ¶
func (c *Cache) SetAppResourcesTree(appName string, resourcesTree *appv1.ApplicationTree) error
func (*Cache) SetClusterInfo ¶
func (c *Cache) SetClusterInfo(server string, info *appv1.ClusterInfo) error
Click to show internal directories.
Click to hide internal directories.