boot

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: MIT Imports: 22 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Boot

func Boot(opt ...Option)

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, cfgCreator plugin.CfgCreator)

RegDaemon register a Daemon creator and its config creator.

func SetLoggerLevel added in v0.9.19

func SetLoggerLevel(lvl string)

SetLoggerLevel change log level dynamically after Boot.

Types

type Booter added in v0.0.3

type Booter struct {
	runner.Runner
	// contains filtered or unexported fields
}

func New

func New(opt ...Option) *Booter

func (*Booter) Init added in v0.0.3

func (b *Booter) Init() error

func (*Booter) OnChildDone added in v0.0.3

func (b *Booter) OnChildDone(child runner.Runner) error

func (*Booter) Start added in v0.0.3

func (b *Booter) Start() error

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 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

Jump to

Keyboard shortcuts

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