boot

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 18 Imported by: 15

Documentation

Index

Constants

View Source
const ENV_CFG_PATH = "CFG_PATH"

Variables

This section is empty.

Functions

func Boot

func Boot(opts ...Option)

func RegisterCfg added in v0.1.9

func RegisterCfg(name string, cfg interface{})

RegisterCfg register additional config, cfg type must be pointer.

func RegisterSvc

func RegisterSvc(typ SvcType, creator plugin.Creator, cfgCreator plugin.CfgCreator)

RegisterSvc register a Svc creator and its config creator.

Types

type Booter added in v0.0.3

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

func New

func New(opts ...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 Option added in v0.2.6

type Option interface {
	// contains filtered or unexported methods
}

func CfgPath added in v0.3.9

func CfgPath(cfgPath string) Option

func DefaultLogCompress added in v0.3.9

func DefaultLogCompress(compress bool) Option

func DefaultLogEncoding added in v0.3.9

func DefaultLogEncoding(encoding string) Option

func DefaultLogMaxAge added in v0.3.9

func DefaultLogMaxAge(maxAge int) Option

func DefaultLogMaxBackups added in v0.3.9

func DefaultLogMaxBackups(maxBackups int) Option

func DefaultLogMaxFileSize added in v0.3.9

func DefaultLogMaxFileSize(maxSize int) Option

func DefaultLogPath added in v0.3.9

func DefaultLogPath(logPath string) Option

func EnvPrefix added in v0.2.6

func EnvPrefix(envPrefix string) Option

type Svc added in v0.0.3

type Svc interface {
	runner.Runner
	plugin.Plugin
}

type SvcType

type SvcType string

Jump to

Keyboard shortcuts

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