Documentation ¶
Index ¶
- Constants
- func EnableWritePid(dir string) error
- func GetServerID() int
- func IsAddrUsedErr(err error) bool
- func Serve(svr GraceServer, name, addr string) error
- func SetAddrInUseWaitSecond(seconds int)
- func SetShutdownTimeout(d time.Duration)
- func Shutdown() error
- func Upgrade(version, path, upgradeURL string) error
- type GraceServer
- type GraceShutdowner
- type Shutdowner
Constants ¶
View Source
const (
ForkCommandArg = "-grace-forked"
)
Variables ¶
This section is empty.
Functions ¶
func EnableWritePid ¶
EnableWritePid enable to write pid file dir - the directory where to write pid file
func IsAddrUsedErr ¶
func SetAddrInUseWaitSecond ¶
func SetAddrInUseWaitSecond(seconds int)
func SetShutdownTimeout ¶
SetShutdownTimeout set the server shutdown timeout duration
Types ¶
type GraceServer ¶
GraceServer serve net listener
type GraceShutdowner ¶
GraceShutdowner support shutdown
Source Files ¶
Click to show internal directories.
Click to hide internal directories.