Documentation
¶
Index ¶
Constants ¶
View Source
const ( FSCacheRootDir = "/home/uipluginoperator/cache" // Cache states used by custom resources Cached = "cached" Disabled = "disabled" Pending = "pending" )
View Source
const (
FilesTxtFilename = "files.txt"
)
Variables ¶
View Source
var (
FsCache = FSCache{}
)
View Source
var (
Index = SafeIndex{}
)
Functions ¶
func Register ¶
func Register( ctx context.Context, systemNamespace, managedBy string, plugin plugincontroller.UIPluginController, pluginCache plugincontroller.UIPluginCache, k8s kubernetes.Interface, )
Types ¶
type FSCache ¶
type FSCache struct{}
func (*FSCache) Save ¶
Save takes in the name and version of a plugin and creates an entry for it in the filesystem cache
func (*FSCache) Sync ¶
func (c *FSCache) Sync(namespace string, cache plugincontroller.UIPluginCache) error
Sync takes in a UIPluginCache object and syncs the filesystem cache with it
type SafeIndex ¶
type SafeIndex struct {
Entries map[string]*v1.UIPluginEntry
// contains filtered or unexported fields
}
func (*SafeIndex) Generate ¶
func (s *SafeIndex) Generate(namespace string, cache plugincontroller.UIPluginCache) error
Generate generates a new index from a UIPluginCache object
func (*SafeIndex) SyncWithFsCache ¶
SyncWithFsCache syncs up entries in the filesystem cache with the index's entries Entries that aren't in the index, but present in the filesystem cache are deleted
Click to show internal directories.
Click to hide internal directories.