Documentation ¶
Index ¶
- func Fatal(msgs ...interface{})
- func FatalOnError(err error)
- func FatalOnErrorf(err error, format string, args ...interface{})
- type App
- func (a *App) AddProber(p prober.Probe)
- func (a *App) GetInnerHTTPServer() *exthttp.MuxServer
- func (a *App) GinServer(opts ...exthttp.OptionFunc) *gin.Engine
- func (a *App) GrpcServer(opts ...extgrpc.Option) *extgrpc.Server
- func (a *App) InitFromCmd(cmd *cobra.Command, name string)
- func (a *App) Run(cmd *cobra.Command)
- func (a *App) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FatalOnErrorf ¶
FatalOnErrorf call fatal with format.
Types ¶
type App ¶
type App struct { // App app name. App string // Logger is zap logger instance. Logger *log.Logger // Reg is prometheus Registerer. Reg prometheus.Registerer // G is run.Group handle goroutines exit. G *run.Group // contains filtered or unexported fields }
App is kit core application.
func (*App) GetInnerHTTPServer ¶ added in v0.2.0
GetInnerHTTPServer get inner metrice pprof health http server should call after InitFromCmd.
func (*App) GinServer ¶
func (a *App) GinServer(opts ...exthttp.OptionFunc) *gin.Engine
GinServer create a gin server with many components controlled by commandline options.
func (*App) GrpcServer ¶
GrpcServer create a grpc server with many components controlled by commandline options.
func (*App) InitFromCmd ¶
InitFromCmd init components which depend commandline options should always be called at first of cobra.Command.Run.
Click to show internal directories.
Click to hide internal directories.