Documentation ¶
Index ¶
- type CacheConfig
- type PluginCache
- type PluginEntry
- func (e *PluginEntry) Cached() (bool, error)
- func (e *PluginEntry) IsLocked() bool
- func (e *PluginEntry) IsRLocked() bool
- func (e *PluginEntry) Load() (modelplugin.ConfigModelPlugin, error)
- func (e *PluginEntry) Lock(ctx context.Context) error
- func (e *PluginEntry) RLock(ctx context.Context) error
- func (e *PluginEntry) RUnlock(ctx context.Context) error
- func (e *PluginEntry) Unlock(ctx context.Context) 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, error)
NewPluginCache creates a new plugin cache
func (*PluginCache) Entry ¶ added in v0.4.0
func (c *PluginCache) Entry(name configmodel.Name, version configmodel.Version) *PluginEntry
Entry returns the entry for the given plugin name+version
type PluginEntry ¶ added in v0.4.0
type PluginEntry struct { Path string // contains filtered or unexported fields }
PluginEntry is an entry for a plugin in the cache
func (*PluginEntry) Cached ¶ added in v0.4.0
func (e *PluginEntry) Cached() (bool, error)
Cached returns whether the plugin is cached
func (*PluginEntry) IsLocked ¶ added in v0.4.0
func (e *PluginEntry) IsLocked() bool
IsLocked checks whether the cache is write locked
func (*PluginEntry) IsRLocked ¶ added in v0.4.0
func (e *PluginEntry) IsRLocked() bool
IsRLocked checks whether the cache is read locked
func (*PluginEntry) Load ¶ added in v0.4.0
func (e *PluginEntry) Load() (modelplugin.ConfigModelPlugin, error)
Load loads the plugin from the cache
func (*PluginEntry) Lock ¶ added in v0.4.0
func (e *PluginEntry) Lock(ctx context.Context) error
Lock acquires a write lock on the cache
func (*PluginEntry) RLock ¶ added in v0.4.0
func (e *PluginEntry) RLock(ctx context.Context) error
RLock acquires a read lock on the cache
Click to show internal directories.
Click to hide internal directories.