gprocess

package
v0.0.0-...-8506bae Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Daemon

func Daemon(mainFunc func(), onKill func()) (err error)

Daemon make your program ability of 1.daemonize 2.forever 3.logging stdout to file. If you used Daemon, you can run your program with arguments `--daemon` `--forever` `--flog foo.log` optionally. If you want to disable logging, specify the -flog null. mainFunc is your `main`, if onKill not nil, it will be called when one signal of syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT received,

Types

This section is empty.

Directories

Path Synopsis
Package gdaemon does add daemon, logging and forever function to your program.
Package gdaemon does add daemon, logging and forever function to your program.
Package ghook package does prevent your program main function to exit when all your worker code in goroutine.
Package ghook package does prevent your program main function to exit when all your worker code in goroutine.
Package gprofiling package help you do profiling your program in easy way.
Package gprofiling package help you do profiling your program in easy way.

Jump to

Keyboard shortcuts

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