Documentation ¶
Index ¶
- Variables
- func AddCacheFlagsToCmd(cmd *cobra.Command) func() (*Cache, error)
- type Cache
- func (c *Cache) GetAppDetails(commitSHA string, appSrc *appv1.ApplicationSource, res interface{}) error
- 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) (ClusterInfo, 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) GetRevisionMetadata(repoURL, revision string) (*appv1.RevisionMetadata, error)
- func (c *Cache) ListApps(repoUrl, revision string) (map[string]string, error)
- func (c *Cache) SetAppDetails(commitSHA string, appSrc *appv1.ApplicationSource, 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) SetApps(repoUrl, revision string, apps map[string]string) error
- func (c *Cache) SetClusterInfo(server string, state *ClusterInfo) 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
- func (c *Cache) SetRevisionMetadata(repoURL, revision string, item *appv1.RevisionMetadata) error
- type CacheClient
- type ClusterInfo
- 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 (c *Cache) GetAppDetails(commitSHA string, appSrc *appv1.ApplicationSource, res interface{}) error
func (*Cache) GetAppManagedResources ¶ added in v0.12.0
func (c *Cache) GetAppManagedResources(appName string, res *[]*appv1.ResourceDiff) error
func (*Cache) GetAppResourcesTree ¶ added in v0.12.0
func (c *Cache) GetAppResourcesTree(appName string, res *appv1.ApplicationTree) error
func (*Cache) GetClusterInfo ¶ added in v1.3.0
func (c *Cache) GetClusterInfo(server string) (ClusterInfo, error)
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) GetRevisionMetadata ¶ added in v1.2.0
func (c *Cache) GetRevisionMetadata(repoURL, revision string) (*appv1.RevisionMetadata, error)
func (*Cache) SetAppDetails ¶ added in v0.12.0
func (c *Cache) SetAppDetails(commitSHA string, appSrc *appv1.ApplicationSource, res interface{}) error
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) SetClusterInfo ¶ added in v1.3.0
func (c *Cache) SetClusterInfo(server string, state *ClusterInfo) error
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
func (*Cache) SetRevisionMetadata ¶ added in v1.2.0
func (c *Cache) SetRevisionMetadata(repoURL, revision string, item *appv1.RevisionMetadata) 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 ClusterInfo ¶ added in v1.3.0
type ClusterInfo struct { appv1.ConnectionState Version string }
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.