Documentation ¶
Index ¶
- func DeleteCurrentPidAndStartTime(path string) error
- func GetProcessStartTime(pid int) (string, error)
- func IsExtensionStillRunning(path string) bool
- func KillPreviousExtension(ctx *log.Context, pidFilePath string)
- func ReadPidAndStartTime(path string) (int, string, error)
- func SaveCurrentPidAndStartTime(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteCurrentPidAndStartTime ¶
DeleteCurrentPidAndStartTime delete the file created by SaveCurrentPidAndStartTime
func GetProcessStartTime ¶
GetProcessStartTime returns the start time of the active process if still active
func IsExtensionStillRunning ¶
IsExtensionStillRunning checks if there is active process for the same extension name
func KillPreviousExtension ¶
KillPreviousExtension handles the case where a process for the same extension name is still active from previous execution. We need to kill it before staring a new one.
func ReadPidAndStartTime ¶
ReadPidAndStartTime reads the stored pid and process start time from a file extName.pid Returns 0 and "" if path not found
func SaveCurrentPidAndStartTime ¶
SaveCurrentPidAndStartTime stores current process id with start date in file extName.pid Example: 325 Tue Dec 8 15:54:04 2020
Types ¶
This section is empty.