Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IConfigLoader ¶
type IConfigLoader interface {
// contains filtered or unexported methods
}
IConfigLoader is internal interface for loading config from external storage
func NewConfigFromDB ¶
func NewConfigFromDB() (IConfigLoader, error)
NewConfigFromDB is function which constructed Configuration loader object
func NewConfigFromFS ¶
func NewConfigFromFS(path string) (IConfigLoader, error)
NewConfigFromFS is function which constructed Configuration loader object
func NewConfigFromS3 ¶
func NewConfigFromS3() (IConfigLoader, error)
NewConfigFromS3 is function which constructed Configuration loader object
type IController ¶
type IController interface {
Load() error
Close() error
Lock()
Unlock()
GetModuleState(id string) *loader.ModuleState
GetModuleStates(ids []string) map[string]*loader.ModuleState
GetModule(id string) *Module
GetModules(ids []string) map[string]*Module
GetModuleIds() []string
GetModuleIdsForAgent(agentID string) []string
StartAllModules() ([]string, error)
StartModulesForAgent(agentID string) ([]string, error)
StopModulesForAgent(agentID string) ([]string, error)
StopAllModules() ([]string, error)
SetUpdateChan(update chan struct{})
SetUpdateChanForAgent(agentID string, update chan struct{})
UnsetUpdateChan(update chan struct{})
UnsetUpdateChanForAgent(agentID string, update chan struct{})
}
IController is interface for loading and control all modules
func NewController ¶
func NewController(r IRegAPI, c IConfigLoader, f IFilesLoader, p vxproto.IVXProto) IController
NewController is function which constructed Controller object
type IFilesLoader ¶
type IFilesLoader interface {
// contains filtered or unexported methods
}
IFilesLoader is internal interface for loading files from external storage
func NewFilesFromFS ¶
func NewFilesFromFS(path string) (IFilesLoader, error)
NewFilesFromFS is function which constructed Files loader object
func NewFilesFromS3 ¶
func NewFilesFromS3() (IFilesLoader, error)
NewFilesFromS3 is function which constructed Files loader object
type IRegAPI ¶
type IRegAPI interface {
RegisterLuaAPI(L *lua.State, config *loader.ModuleConfig) error
UnregisterLuaAPI(L *lua.State, config *loader.ModuleConfig) error
}
IRegAPI is interface of Main Module for registrate extra Lua API
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module is struct for contains module struct from store
func (*Module) GetConfig ¶
func (m *Module) GetConfig() *loader.ModuleConfig
GetConfig is function that return module config object
func (*Module) GetFiles ¶
func (m *Module) GetFiles() *loader.ModuleFiles
GetFiles is function that return module files object