start

package
v0.0.0-...-846bdf4 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStartCommand

func NewStartCommand(ctx context.Context) *cobra.Command

func Start

func Start(ctx context.Context, configFile string) error

Types

type ModuleManager

type ModuleManager interface {
	// regist a new module
	Regist(name string, creator NewModuleFunc, modes ...common.RunModeType) error
	// set module dependency modules
	SetDependencies(name string, dependencies ...string) error

	// when [modules] are all ready, hook will called
	AddReadyHook(hook ModuleReadyHook, modules ...string) error

	// start to run all modules
	Start(ctx context.Context, mode common.RunModeType, conf *modules.ModuleRuntimeConfigs) error
}

func NewModuleManager

func NewModuleManager() ModuleManager

type ModuleReadyHook

type ModuleReadyHook func(ctx context.Context, modules map[string]modules.Module) error

type NewModuleFunc

type NewModuleFunc func(*modules.ModuleRuntimeConfigs) (modules.Module, error)

Jump to

Keyboard shortcuts

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