Documentation ¶
Index ¶
- Variables
- type Config
- type Hub
- func (hub *Hub) Close() error
- func (hub *Hub) DownloadPlugins(list ...string) error
- func (hub *Hub) GetPluginFromDistributionService(name string) error
- func (hub *Hub) GetPluginSource(name string) error
- func (hub *Hub) OpenCoordinatorPlugin(name string) (coordinator.Plugin, error)
- func (hub *Hub) OpenDevicePlugin(name string) (device.Plugin, error)
- func (hub *Hub) OpenPlugin(name string) (interface{}, error)
- func (hub *Hub) OpenProcessorPlugin(name string) (processor.Plugin, error)
- func (hub *Hub) OpenSelectorPlugin(name string) (selector.Plugin, error)
- func (hub *Hub) RunDistributionService()
- type WebServiceOperations
Constants ¶
This section is empty.
Variables ¶
var ( // ErrHub is the root of errors caused by Hub ErrHub = errors.NewClass("Hub Error") // ErrInvalid indicates an invalid argument ErrInvalid = ErrHub.New("Invalid argument") // ErrNotFound is returned when the plugin is not found ErrNotFound = ErrHub.New("Plugin not found") )
var (
Service = ":7777"
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Path is the location where hub will store the plugins. Validator // automatically ensures that the path is present. If it is not, it fails Path string `validate:"required,dir"` }
Config includes the execution parameters of the HUB
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub is a insitu hub, or repository, of modules and schemas
func New ¶
NewHub creates a New hub on the $Root/plugin directory and keep an exlusive lock for as long as the process is running
func (*Hub) DownloadPlugins ¶
DownloadPlugins install the list of plugins.
func (*Hub) GetPluginFromDistributionService ¶
func (*Hub) GetPluginSource ¶
GetPluginSource uses the go get command to download and compiles the plugin
func (*Hub) OpenCoordinatorPlugin ¶
func (hub *Hub) OpenCoordinatorPlugin(name string) (coordinator.Plugin, error)
OpenCoordinatorPlugin opens a Coordinator plugin
func (*Hub) OpenDevicePlugin ¶
OpenDevicePlugin opens a Device plugin
func (*Hub) OpenPlugin ¶
OpenPlugin opens a plugin.
func (*Hub) OpenProcessorPlugin ¶
OpenCoordinatorPlugin opens a Coordinator plugin
func (*Hub) OpenSelectorPlugin ¶
OpenSelectorPlugin opens a Selector plugin
func (*Hub) RunDistributionService ¶
func (hub *Hub) RunDistributionService()
RunDistributionService runs a sever in the default hub for distributing binary plugins to the daemons.