extapp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(msgs ...interface{})

func FatalOnError

func FatalOnError(err error)

func FatalOnErrorf

func FatalOnErrorf(err error, format string, args ...interface{})

Types

type App

type App struct {
	App          string
	Logger       *log.Logger
	Reg          prometheus.Registerer
	Registry     *prometheus.Registry
	Cmd          *cobra.Command
	G            *run.Group
	HttpProber   *prober.HTTPProbe
	StatusProber prober.Probe // grpc or http
	// contains filtered or unexported fields
}

func NewApp

func NewApp() *App

func (*App) GetInnerHttpServer

func (a *App) GetInnerHttpServer() *exthttp.MuxServer

GetInnerHttpServer should call after InitFromCmd.

func (*App) GinServer

func (a *App) GinServer(opts ...exthttp.OptionFunc) *gin.Engine

func (*App) GrpcServer

func (a *App) GrpcServer(opts ...extgrpc.Option) *extgrpc.Server

func (*App) InitFromCmd

func (a *App) InitFromCmd(cmd *cobra.Command, name string)

func (*App) Run

func (a *App) Run(cmd *cobra.Command)

func (*App) Start

func (a *App) Start() error

Jump to

Keyboard shortcuts

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