bootstrap

package
v0.13.25-2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootstrapSyncSeparateAsync added in v0.13.12

func BootstrapSyncSeparateAsync(funcs ...func())

异步初始化,全部完成后同步返回

Types

type Application

type Application struct {
	BootOptions   BootstrapOptions
	ServerOptions server.Options
	Registry      registry.IRegistry
	Mq            mq.IClient
	Redis         *redis.RedisClient
	IdWorker      *idworker.Worker
	ConfigCenter  config.IConfig
}
var MthApplication *Application

func StartBase

func StartBase(reader io.Reader, fileType string) *Application

func (*Application) Bootstrap added in v0.5.1

func (app *Application) Bootstrap(options Options)

func (*Application) BootstrapAll added in v0.5.1

func (app *Application) BootstrapAll(options Options)

func (*Application) ShutDown

func (app *Application) ShutDown()

func (*Application) StartLogger

func (app *Application) StartLogger()

func (*Application) StartWebServer

func (app *Application) StartWebServer(srv server.Server, gracefulShutDown ...func())

type BootstrapOptions

type BootstrapOptions struct {
	Profile              string
	ServerAddress        string
	ServerPort           uint64
	ServerName           string
	Host                 string
	LoggerDir            string
	H2C                  bool
	H2                   bool
	LoggerConsole        bool
	LoggerJson           bool
	Config               config.IConfig
	MaxServerConcurrency int
	MaxRequestBodySize   int
}

type Options added in v0.5.0

type Options struct {
	Registry     registry.IRegistry
	Mq           mq.IClient
	Redis        *redis.RedisClient
	IdWorker     *idworker.Worker
	ConfigCenter config.IConfig
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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