core

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 122

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetModuleExchange added in v1.9.3

func GetModuleExchange() *socket.ModuleExchange

GetModuleExchange return module exchange

func GetModules

func GetModules() map[string]*ModuleInfo

GetModules gets modules map

func GracefulShutdown

func GracefulShutdown()

GracefulShutdown is if it gets the special signals it does modules cleanup

func Register

func Register(m Module, opts ...string)

Register register module if not passed in parameter opts, default contextType is "channel"

func Run

func Run()

Run starts the modules and in the end does module cleanup

func StartModules

func StartModules()

StartModules starts modules that are registered

Types

type Module

type Module interface {
	Name() string
	Group() string
	Start()
	Enable() bool
}

Module interface

type ModuleInfo added in v1.10.3

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

ModuleInfo represent a module info

func (*ModuleInfo) GetModule added in v1.10.3

func (m *ModuleInfo) GetModule() Module

GetModule gets module

Jump to

Keyboard shortcuts

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