appstate

package
v1.8.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCacheMiss = cacheutil.ErrCacheMiss

Functions

func AddCacheFlagsToCmd

func AddCacheFlagsToCmd(cmd *cobra.Command, opts ...func(client *redis.Client)) func() (*Cache, error)

Types

type Cache

type Cache struct {
	Cache *cacheutil.Cache
	// contains filtered or unexported fields
}

func NewCache

func NewCache(cache *cacheutil.Cache, appStateCacheExpiration time.Duration) *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 added in v1.7.0

func (c *Cache) GetClusterInfo(server string, res *appv1.ClusterInfo) error

func (*Cache) GetItem

func (c *Cache) GetItem(key string, item interface{}) error

func (*Cache) OnAppResourcesTreeChanged added in v1.7.3

func (c *Cache) OnAppResourcesTreeChanged(ctx context.Context, appName string, callback func() error) error

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 added in v1.7.0

func (c *Cache) SetClusterInfo(server string, info *appv1.ClusterInfo) error

func (*Cache) SetItem

func (c *Cache) SetItem(key string, item interface{}, expiration time.Duration, delete bool) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL