Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PluginStatusEvent ¶
type PluginStatusEvent struct { idxmap.NamedMappingEvent Value *status.PluginStatus }
PluginStatusEvent represents an item sent through watch channel in pluginStatusMap. In contrast to NameToIdxDto it contains typed Value.
type PluginStatusIdxMap ¶
type PluginStatusIdxMap interface { // GetMapping returns internal read-only mapping with Value of type interface{}. GetMapping() idxmap.NamedMapping // GetValue looks up previously stored item identified by index in mapping. GetValue(pluginName string) (data *status.PluginStatus, exists bool) // WatchNameToIdx allows to subscribe for watching changes in pluginStatusMap mapping WatchNameToIdx(subscriber core.PluginName, pluginChannel chan PluginStatusEvent) }
PluginStatusIdxMap provides map of plugin names to plugin status. Other plugins can watch changes to this map.
func NewPluginStatusMap ¶
func NewPluginStatusMap(owner core.PluginName) PluginStatusIdxMap
NewPluginStatusMap is a constructor
type PluginStatusIdxMapRW ¶
type PluginStatusIdxMapRW interface { PluginStatusIdxMap // RegisterName adds new item into name-to-index mapping. Put(pluginName string, pluginStatus *status.PluginStatus) // UnregisterName removes an item identified by name from mapping Delete(pluginName string) (data *status.PluginStatus, exists bool) }
PluginStatusIdxMapRW exposes not only PluginStatusIdxMap but also write methods
Click to show internal directories.
Click to hide internal directories.