app

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name    string
	Desc    string
	Version = version.Get()
	Mode    = mode.Get() // 用于加载不同环境变量和配置文件

)

Functions

func AddBoots

func AddBoots(boots ...Bootstrapper)

func ReloadConfig

func ReloadConfig()

func Run

func Run(bc BootstrapConfig)

func Setup

func Setup(name string, desc string, view fs.FS)

Types

type BootFunc

type BootFunc func() error

func (BootFunc) Boot

func (bf BootFunc) Boot() error

type BootstrapConfig

type BootstrapConfig struct {
	Port       int
	ConfigFile string
	DebugLog   bool
	VerboseLog bool
}

type Bootstrapper

type Bootstrapper interface {
	// Name() string
	Boot() error
}

type Launcher

type Launcher struct {
	Boots []Bootstrapper
}

func (*Launcher) Add

func (l *Launcher) Add(boots ...Bootstrapper)

func (*Launcher) Run

func (l *Launcher) Run()

Jump to

Keyboard shortcuts

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