boot

package
v0.12.5 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 26 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Boot

func Boot(opt ...Option)

func New

func New(opt ...Option) runner.Runner

func RegCfg added in v0.9.19

func RegCfg(name string, cfg any)

RegCfg register additional config, cfg type must be pointer.

func RegDaemon added in v0.9.19

func RegDaemon(typ DaemonType, creator plugin.Creator[Daemon], cfgCreator plugin.CfgCreator[any])

RegDaemon register a Daemon creator and its config creator.

func SetLogLevel added in v0.12.0

func SetLogLevel(lvl string)

SetLogLevel change log level dynamically after Boot.

func UnRegDaemon added in v0.11.13

func UnRegDaemon(typ ...DaemonType)

Types

type Daemon added in v0.5.5

type Daemon interface {
	runner.Runner
	plugin.Plugin
}

type DaemonType added in v0.5.5

type DaemonType string

type OnConfigLoadedFunc added in v0.11.13

type OnConfigLoadedFunc func(cfg map[string]any)

type Option added in v0.2.6

type Option func(*booter)

func CfgPath added in v0.3.9

func CfgPath(cfgPath string) Option

func DefaultLogCfg added in v0.6.3

func DefaultLogCfg(cfg *log.Cfg) Option

func EnvPrefix added in v0.2.6

func EnvPrefix(envPrefix string) Option

func OnConfigLoaded added in v0.11.13

func OnConfigLoaded(f OnConfigLoadedFunc) Option

Jump to

Keyboard shortcuts

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