Documentation ¶
Index ¶
- Variables
- func AddCacheFlagsToCmd(cmd *cobra.Command) func() (*Cache, error)
- type Cache
- func (c *Cache) GetAppDetails(commitSHA, path string, valueFiles []string, res interface{}) error
- func (c *Cache) GetAppManagedResources(appName string) ([]*appv1.ResourceDiff, error)
- func (c *Cache) GetAppResourcesTree(appName string) (*appv1.ApplicationTree, error)
- func (c *Cache) GetClusterConnectionState(server string) (appv1.ConnectionState, error)
- func (c *Cache) GetGitFile(commitSha string, path string) ([]byte, error)
- func (c *Cache) GetGitListDir(commitSha string, path string) ([]string, error)
- func (c *Cache) GetManifests(commitSHA string, appSrc *appv1.ApplicationSource, namespace string, ...) error
- func (c *Cache) GetOIDCState(key string) (*OIDCState, error)
- func (c *Cache) GetRepoConnectionState(repo string) (appv1.ConnectionState, error)
- func (c *Cache) SetAppDetails(commitSHA, path string, valueFiles []string, res interface{}) error
- func (c *Cache) SetAppManagedResources(appName string, managedResources []*appv1.ResourceDiff) error
- func (c *Cache) SetAppResourcesTree(appName string, resourcesTree *appv1.ApplicationTree) error
- func (c *Cache) SetClusterConnectionState(server string, state *appv1.ConnectionState) error
- func (c *Cache) SetGitFile(commitSha string, path string, data []byte) error
- func (c *Cache) SetListDir(commitSha string, path string, files []string) error
- func (c *Cache) SetManifests(commitSHA string, appSrc *appv1.ApplicationSource, namespace string, ...) error
- func (c *Cache) SetOIDCState(key string, state *OIDCState) error
- func (c *Cache) SetRepoConnectionState(repo string, state *appv1.ConnectionState) error
- type CacheClient
- type InMemoryCache
- type Item
- type OIDCState
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCacheMiss = errors.New("cache: key is missing")
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache provides strongly types methods to store and retrieve values from shared cache
func NewCache ¶ added in v0.12.0
func NewCache(cacheClient CacheClient) *Cache
NewCache creates new instance of Cache
func (*Cache) GetAppDetails ¶ added in v0.12.0
func (*Cache) GetAppManagedResources ¶ added in v0.12.0
func (c *Cache) GetAppManagedResources(appName string) ([]*appv1.ResourceDiff, error)
func (*Cache) GetAppResourcesTree ¶ added in v0.12.0
func (c *Cache) GetAppResourcesTree(appName string) (*appv1.ApplicationTree, error)
func (*Cache) GetClusterConnectionState ¶ added in v0.12.0
func (c *Cache) GetClusterConnectionState(server string) (appv1.ConnectionState, error)
func (*Cache) GetGitFile ¶ added in v0.12.0
func (*Cache) GetGitListDir ¶ added in v0.12.0
func (*Cache) GetManifests ¶ added in v0.12.0
func (*Cache) GetOIDCState ¶ added in v0.12.0
func (*Cache) GetRepoConnectionState ¶ added in v0.12.0
func (c *Cache) GetRepoConnectionState(repo string) (appv1.ConnectionState, error)
func (*Cache) SetAppDetails ¶ added in v0.12.0
func (*Cache) SetAppManagedResources ¶ added in v0.12.0
func (c *Cache) SetAppManagedResources(appName string, managedResources []*appv1.ResourceDiff) error
func (*Cache) SetAppResourcesTree ¶ added in v0.12.0
func (c *Cache) SetAppResourcesTree(appName string, resourcesTree *appv1.ApplicationTree) error
func (*Cache) SetClusterConnectionState ¶ added in v0.12.0
func (c *Cache) SetClusterConnectionState(server string, state *appv1.ConnectionState) error
func (*Cache) SetGitFile ¶ added in v0.12.0
func (*Cache) SetListDir ¶ added in v0.12.0
func (*Cache) SetManifests ¶ added in v0.12.0
func (*Cache) SetOIDCState ¶ added in v0.12.0
func (*Cache) SetRepoConnectionState ¶ added in v0.12.0
func (c *Cache) SetRepoConnectionState(repo string, state *appv1.ConnectionState) error
type CacheClient ¶ added in v0.12.0
type CacheClient interface { Set(item *Item) error Get(key string, obj interface{}) error Delete(key string) error }
func NewRedisCache ¶
func NewRedisCache(client *redis.Client, expiration time.Duration) CacheClient
type InMemoryCache ¶ added in v0.9.0
type InMemoryCache struct {
// contains filtered or unexported fields
}
func NewInMemoryCache ¶
func NewInMemoryCache(expiration time.Duration) *InMemoryCache
func (*InMemoryCache) Delete ¶ added in v0.11.0
func (i *InMemoryCache) Delete(key string) error
func (*InMemoryCache) Flush ¶ added in v0.9.0
func (i *InMemoryCache) Flush()
func (*InMemoryCache) Get ¶ added in v0.9.0
func (i *InMemoryCache) Get(key string, obj interface{}) error
func (*InMemoryCache) Set ¶ added in v0.9.0
func (i *InMemoryCache) Set(item *Item) error
Click to show internal directories.
Click to hide internal directories.