Documentation
¶
Index ¶
- type CacheConfig
- type PluginCache
- func (c *PluginCache) Cached(name configmodel.Name, version configmodel.Version) (bool, error)
- func (c *PluginCache) GetPath(name configmodel.Name, version configmodel.Version) (string, error)
- func (c *PluginCache) IsLocked() bool
- func (c *PluginCache) IsRLocked() bool
- func (c *PluginCache) Load(name configmodel.Name, version configmodel.Version) (modelplugin.ConfigModelPlugin, error)
- func (c *PluginCache) Lock() error
- func (c *PluginCache) RLock() error
- func (c *PluginCache) RUnlock() error
- func (c *PluginCache) Unlock() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheConfig ¶
type CacheConfig struct {
Path string `yaml:"path" json:"path"`
}
CacheConfig is a plugin cache configuration
type PluginCache ¶
type PluginCache struct {
Config CacheConfig
// contains filtered or unexported fields
}
PluginCache is a model plugin cache
func NewPluginCache ¶
func NewPluginCache(config CacheConfig, resolver *pluginmodule.Resolver) *PluginCache
NewPluginCache creates a new plugin cache
func (*PluginCache) Cached ¶
func (c *PluginCache) Cached(name configmodel.Name, version configmodel.Version) (bool, error)
Cached returns whether the given plugin is cached
func (*PluginCache) GetPath ¶
func (c *PluginCache) GetPath(name configmodel.Name, version configmodel.Version) (string, error)
GetPath gets the path of the given plugin
func (*PluginCache) IsLocked ¶
func (c *PluginCache) IsLocked() bool
IsLocked checks whether the cache is write locked
func (*PluginCache) IsRLocked ¶
func (c *PluginCache) IsRLocked() bool
IsRLocked checks whether the cache is read locked
func (*PluginCache) Load ¶
func (c *PluginCache) Load(name configmodel.Name, version configmodel.Version) (modelplugin.ConfigModelPlugin, error)
Load loads a plugin from the cache
func (*PluginCache) Lock ¶
func (c *PluginCache) Lock() error
Lock acquires a write lock on the cache
func (*PluginCache) RLock ¶
func (c *PluginCache) RLock() error
RLock acquires a read lock on the cache
func (*PluginCache) RUnlock ¶
func (c *PluginCache) RUnlock() error
RUnlock releases a read lock on the cache
func (*PluginCache) Unlock ¶
func (c *PluginCache) Unlock() error
Unlock releases a write lock from the cache
Click to show internal directories.
Click to hide internal directories.