module

package
v0.0.0-...-f923667 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Event   string
	Payload interface{}
}

type Module

type Module struct {
	// contains filtered or unexported fields
}

func (*Module) Emit

func (m *Module) Emit(event Event)

func (*Module) GetEventChannel

func (m *Module) GetEventChannel() chan Event

func (*Module) GetExternalModule

func (m *Module) GetExternalModule(name string) interface{}

func (*Module) GetInterface

func (m *Module) GetInterface() interface{}

func (*Module) SetInterface

func (m *Module) SetInterface(iface interface{})

func (*Module) SetupDependencies

func (m *Module) SetupDependencies(dependencies []string) error

func (*Module) SetupFuncAfterReady

func (m *Module) SetupFuncAfterReady(fn func())

type ModuleInfo

type ModuleInfo struct {
	Name     string
	FilePath string
	Plugin   *plugin.Plugin
	Instance *Module
}

type ModuleManager

type ModuleManager struct {
	// contains filtered or unexported fields
}

func CreateModuleManager

func CreateModuleManager() *ModuleManager

func (*ModuleManager) AddModulePath

func (mg *ModuleManager) AddModulePath(modulePath string)

func (*ModuleManager) Broadcast

func (mg *ModuleManager) Broadcast(eventName string, payload interface{})

func (*ModuleManager) Exists

func (mg *ModuleManager) Exists(moduleName string) bool

func (*ModuleManager) FindModule

func (mg *ModuleManager) FindModule(moduleName string, modulePath string) (*ModuleInfo, error)

func (*ModuleManager) GetFuncsAfterReady

func (mg *ModuleManager) GetFuncsAfterReady() map[string]func()

func (*ModuleManager) GetModule

func (mg *ModuleManager) GetModule(name string) (*Module, error)

func (*ModuleManager) GetModules

func (mg *ModuleManager) GetModules(names []string) (map[string]interface{}, error)

func (*ModuleManager) InitModule

func (mg *ModuleManager) InitModule(moduleInfo *ModuleInfo) (*ModuleInfo, error)

func (*ModuleManager) Load

func (mg *ModuleManager) Load(modulePath string, moduleName string) (*ModuleInfo, error)

func (*ModuleManager) LoadModules

func (mg *ModuleManager) LoadModules(names []string)

func (*ModuleManager) Register

func (mg *ModuleManager) Register(name string, moduleInfo *ModuleInfo)

func (*ModuleManager) SearchModule

func (mg *ModuleManager) SearchModule(moduleName string) (*ModuleInfo, error)

func (*ModuleManager) SetupFuncAfterReady

func (mg *ModuleManager) SetupFuncAfterReady(moduleName string, fn func())

func (*ModuleManager) Unregister

func (mg *ModuleManager) Unregister(name string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL