extensions

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtensionControl

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

ExtensionControl provides functionalities for controlling a loaded extension

type Manager

type Manager struct {
	types.ModuleCommon
	// contains filtered or unexported fields
}

Manager implements Modules. It provides extension management functionalities.

func NewManager

func NewManager(cfg *config.AppConfig) *Manager

NewManager creates an instance of Manager

func (*Manager) Attachable

func (m *Manager) Attachable() bool

Attachable indicates that a module can be loaded in attach mode

func (*Manager) ConfigureVM

func (m *Manager) ConfigureVM(vm *otto.Otto) prompt.Completer

ConfigureVM implements types.ModulesHub. It configures the JS context and return any number of console prompt suggestions

func (*Manager) Exist

func (m *Manager) Exist(name string) bool

Exist checks whether an extension exists

func (*Manager) Installed

func (m *Manager) Installed() (extensions []string)

Installed returns all installed extensions

func (*Manager) IsRunning

func (m *Manager) IsRunning(name string) bool

IsRunning checks whether an extension is running

func (*Manager) Load

func (m *Manager) Load(name string, args ...map[string]string) map[string]interface{}

Load loads an extension. Returns control functions: - run: for running the extension. - isRunning: for checking run status - stop: for stopping the extension

func (*Manager) Run

func (m *Manager) Run(name string, args ...map[string]string) map[string]interface{}

Run loads and starts an extension. It returns controls for checking run status and for stopping it.

func (*Manager) Running

func (m *Manager) Running() []string

Running returns a list of running extension

func (*Manager) SetMainModule

func (m *Manager) SetMainModule(main types.ModulesHub)

SetMainModule configures the main JS module

func (*Manager) Stop

func (m *Manager) Stop(name string)

Stop a running extension

Jump to

Keyboard shortcuts

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