Documentation
¶
Overview ¶
Package app 核心功能的实现
Index ¶
- func Grace(app *App, sig ...os.Signal)
- type App
- func (app *App) AddCompresses(m map[string]compress.WriterFunc) error
- func (app *App) Close() error
- func (app *App) Config() *config.Manager
- func (app *App) ErrorHandlers() *errorhandler.ErrorHandler
- func (app *App) IsDebug() bool
- func (app *App) LocalPrinter(tag language.Tag, opts ...message.Option) *message.Printer
- func (app *App) Logs() *logs.Logs
- func (app *App) Messages() *messages.Messages
- func (app *App) Mimetypes() *mimetype.Mimetypes
- func (app *App) Path(p string) string
- func (app *App) Serve() (err error)
- func (app *App) Server() *http.Server
- func (app *App) Shutdown() error
- func (app *App) URL(path string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
App 程序运行实例
func (*App) AddCompresses ¶ added in v0.25.0
func (app *App) AddCompresses(m map[string]compress.WriterFunc) error
AddCompresses 添加压缩处理函数
func (*App) ErrorHandlers ¶ added in v0.21.0
func (app *App) ErrorHandlers() *errorhandler.ErrorHandler
ErrorHandlers 错误处理功能
func (*App) LocalPrinter ¶ added in v0.25.0
LocalPrinter 获取本地化的输出对象
func (*App) Serve ¶
Serve 加载各个模块的数据,运行路由,执行监听程序。
当调用 Shutdown 关闭服务时,会等待其完成未完的服务,才返回 http.ErrServerClosed
Click to show internal directories.
Click to hide internal directories.