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 ¶
func NewCache(cacheClient CacheClient) *Cache
NewCache creates new instance of Cache
func (*Cache) GetAppDetails ¶
func (*Cache) GetAppManagedResources ¶
func (c *Cache) GetAppManagedResources(appName string) ([]*appv1.ResourceDiff, error)
func (*Cache) GetAppResourcesTree ¶
func (c *Cache) GetAppResourcesTree(appName string) (*appv1.ApplicationTree, error)
func (*Cache) GetClusterConnectionState ¶
func (c *Cache) GetClusterConnectionState(server string) (appv1.ConnectionState, error)
func (*Cache) GetGitFile ¶
func (*Cache) GetGitListDir ¶
func (*Cache) GetManifests ¶
func (*Cache) GetRepoConnectionState ¶
func (c *Cache) GetRepoConnectionState(repo string) (appv1.ConnectionState, error)
func (*Cache) SetAppDetails ¶
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) SetClusterConnectionState ¶
func (c *Cache) SetClusterConnectionState(server string, state *appv1.ConnectionState) error
func (*Cache) SetGitFile ¶
func (*Cache) SetListDir ¶
func (*Cache) SetManifests ¶
func (*Cache) SetRepoConnectionState ¶
func (c *Cache) SetRepoConnectionState(repo string, state *appv1.ConnectionState) error
type CacheClient ¶
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 ¶
type InMemoryCache struct {
// contains filtered or unexported fields
}
func NewInMemoryCache ¶
func NewInMemoryCache(expiration time.Duration) *InMemoryCache
func (*InMemoryCache) Delete ¶
func (i *InMemoryCache) Delete(key string) error
func (*InMemoryCache) Flush ¶
func (i *InMemoryCache) Flush()
func (*InMemoryCache) Get ¶
func (i *InMemoryCache) Get(key string, obj interface{}) error
func (*InMemoryCache) Set ¶
func (i *InMemoryCache) Set(item *Item) error
Click to show internal directories.
Click to hide internal directories.