sy

package
v0.0.0-...-4873089 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwaitingSignal

func AwaitingSignal(done chan bool, f func())

AwaitingSignal awaits signal interrupt(ctl+c) or terminated(by kill)

func SetupApp

func SetupApp(appOption *AppOption)

SetupApp setup the application.

func UpdatePidFile

func UpdatePidFile(pidFileVars ...string) error

UpdatePidFile update the pid to pidFile like var/pid (kill -USR2 {pid} 会执行重启) If pidFile is empty, it will try env PID_FILE' value, then to "var/pid" file.

Types

type AppOption

type AppOption struct {
	EnvPrefix   string
	LogLevel    string
	ConfigBeans []interface{}

	LogWriter io.Writer
	CnfTpl    string
	CtlTpl    string
}

AppOption defines the application options.

Jump to

Keyboard shortcuts

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