Documentation
¶
Index ¶
- func InitGinEngine(opt UseEngine) *gin.Engine
- func Run(ctx context.Context, opts ...Option) error
- func RunHTTPServer(ctx context.Context, handler http.Handler) func()
- func RunServer(ctx context.Context, opts ...Option) (func(), error)
- func RunWebCmd(ctx context.Context, action func(c *cli.Context) error) *cli.Command
- func RunWithShutdown(ctx context.Context, runServer func() (func(), error)) error
- type BuildInjector
- type Healthz
- type Option
- type Options
- type Router
- type Status
- type SysStatus
- type UseEngine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunHTTPServer ¶
RunHTTPServer 初始化http服务
Types ¶
type BuildInjector ¶
BuildInjector 构建注入器的方法
type Options ¶
type Options struct { ConfigFile string Version string BuildInjector BuildInjector }
Options options
type Status ¶
type Status struct { Uptime string NumGoroutine int // General statistics. MemAllocated string // bytes allocated and still in use MemTotal string // bytes allocated (even if freed) MemSys string // bytes obtained from system (sum of XxxSys below) Lookups uint64 // number of pointer lookups MemMallocs uint64 // number of mallocs MemFrees uint64 // number of frees // Main allocation heap statistics. HeapAlloc string // bytes allocated and still in use HeapSys string // bytes obtained from system HeapIdle string // bytes in idle spans HeapInuse string // bytes in non-idle span HeapReleased string // bytes released to the OS HeapObjects uint64 // total number of allocated objects // Low-level fixed-size structure allocator statistics. // Inuse is bytes used now. // Sys is bytes obtained from system. StackInuse string // bootstrap stacks StackSys string MSpanInuse string // mspan structures MSpanSys string MCacheInuse string // mcache structures MCacheSys string BuckHashSys string // profiling bucket hash table GCSys string // GC metadata OtherSys string // other system allocations // Garbage collector statistics. NextGC string // next run in HeapAlloc time (bytes) LastGC string // last run in absolute time (ns) PauseTotalNs string PauseNs string // circular buffer of recent GC pause times, most recent at [(NumGC+255)%256] NumGC uint32 }
Status 应用状态
Click to show internal directories.
Click to hide internal directories.