core

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: Apache-2.0 Imports: 8 Imported by: 122

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableModuleRestart added in v1.19.0

func EnableModuleRestart()

EnableModuleRestart enable feature for auto restarting modules

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 IsModuleRestartEnabled added in v1.19.0

func IsModuleRestartEnabled() bool

IsModuleRestartEnabled checks whether auto-restart feature is enabled.

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