app

package
v0.0.0-...-9493ce7 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitOK     = iota // 退出码成功
	DefaultSep = "="  // 默认命令行分隔符
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	auto_lock.AutoLock
	PID     int
	ArgsMap map[string][]string
	// contains filtered or unexported fields
}

App 应用

func GetInstance

func GetInstance() *App

GetInstance 获取单例

func (*App) AddShutdownHook

func (object *App) AddShutdownHook(hook ...ShutdownHook) *App

AddShutdownHook 添加关闭钩子

func (*App) EnablePPROF

func (object *App) EnablePPROF(addr string) *App

EnablePPROF 启动PPPROF

func (*App) IsShutdown

func (object *App) IsShutdown() bool

IsShutdown 是否已关闭

func (*App) Shutdown

func (object *App) Shutdown() *App

Shutdown 关闭

func (*App) WaitComplete

func (object *App) WaitComplete()

WaitComplete 等待完成

func (*App) WaitShutdown

func (object *App) WaitShutdown()

WaitShutdown 等待关闭

type ShutdownHook

type ShutdownHook func()

关闭钩子

Jump to

Keyboard shortcuts

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