Documentation
¶
Index ¶
- func CallInit() (err error)
- func GetCallStack(depth int) stack.CallStack
- func Init(appName string, configOptions ...interface{})
- func InitApp(appName, version string, options ...interface{})
- func InitApp2(appName, version, logfilesize string, logfilenum int, options ...interface{})
- func Must(err error, msg string, args ...interface{})
- func Panic(err error, msg string, args ...interface{})
- func RegisterInit(initfuncs ...func() error)
- func Unix(sec, nsec int64) time.Time
- type PanicError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallInit ¶ added in v0.21.0
func CallInit() (err error)
CallInit calls the registered initialization functions.
func GetCallStack ¶ added in v0.22.0
GetCallStack returns the stacks of the caller.
func Init ¶ added in v0.7.0
func Init(appName string, configOptions ...interface{})
Init is equal to InitApp(appName, gover.Text(), configOptions...).
func InitApp ¶
func InitApp(appName, version string, options ...interface{})
InitApp initializes the application, which is equal to
InitApp2(appName, version, "100M", 100, options...)
func InitApp2 ¶ added in v0.4.0
InitApp2 initializes the application.
- Register the log options.
- Initialize configuration.
- Initialize the logging.
- Call the registered initialization functions.
func Must ¶ added in v0.15.0
Must logs the error with the msg and the program exits if err is not nil. Or do nothing.
func RegisterInit ¶ added in v0.21.0
func RegisterInit(initfuncs ...func() error)
RegisterInit registers the initialization functions.
Types ¶
type PanicError ¶ added in v0.22.0
PanicError is used to represent the panic error.
func NewPanicError ¶ added in v0.22.0
func NewPanicError(panic interface{}, depth int) PanicError
NewPanicError returns a new PanicError.
func (PanicError) Error ¶ added in v0.22.0
func (pe PanicError) Error() string
Directories
¶
Path | Synopsis |
---|---|
Package config is used to initialize the configuration.
|
Package config is used to initialize the configuration. |
Package db supplies some assistant functions about the database.
|
Package db supplies some assistant functions about the database. |
Package exec supplies some convenient execution functions.
|
Package exec supplies some convenient execution functions. |
Package log is used to initialize the logger, and supplies some assistant functions about log.
|
Package log is used to initialize the logger, and supplies some assistant functions about log. |
Package net supplies some assistant functions about net, such as the gateway ip and routes.
|
Package net supplies some assistant functions about net, such as the gateway ip and routes. |
Package opentracing is used to initialize the opentracing from the plugin, and supplies the OpenTracing http.RoundTripper and router middleware.
|
Package opentracing is used to initialize the opentracing from the plugin, and supplies the OpenTracing http.RoundTripper and router middleware. |
Package router suppies some router assistant functions, such as the router Handlers and Middlewares.
|
Package router suppies some router assistant functions, such as the router Handlers and Middlewares. |
Package validate supp
|
Package validate supp |
Click to show internal directories.
Click to hide internal directories.