boot

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 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 Get added in v0.13.0

func Get[D Daemon](typ DaemonType) D

func Reg added in v0.13.0

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

Reg register a Daemon creator and its config creator.

func RegCfg added in v0.9.19

func RegCfg(name string, cfg any)

RegCfg register additional config, cfg type must be pointer.

func SetLogLevel added in v0.12.0

func SetLogLevel(lvl string)

SetLogLevel change log level dynamically after Boot.

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(any)

type OnCreatedFunc added in v0.13.0

type OnCreatedFunc func()

type OnInitializedFunc added in v0.13.0

type OnInitializedFunc func()

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(t DaemonType, f OnConfigLoadedFunc) Option

func OnCreated added in v0.13.0

func OnCreated(t DaemonType, f OnCreatedFunc) Option

func OnInitialized added in v0.13.0

func OnInitialized(t DaemonType, f OnInitializedFunc) Option

Jump to

Keyboard shortcuts

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