package process

import "github.com/Diarkis/diarkis/process"

Package process is deprecated.

Please use passthrough functions via diarkis.go, or find another utility.

Index

Functions

func GetShutdownTimeout deprecated

func GetShutdownTimeout() int64

GetShutdownTimeout returns the server process shutdown timeout in seconds.

Important

Default is 10 seconds.

Important

If DIARKIS_SHUTDOWN_TIMEOUT env is given, shutdown timeout changes.

Deprecated: Please use [diarkis.ShutdownTimeout]

func IsRunning deprecated

func IsRunning() bool

IsRunning returns true if the process is running

Deprecated: Please use [diarkis.IsRunning]

func IsTerminating deprecated

func IsTerminating() bool

IsTerminating returns true when the process is in termination mode after invoking Stop

Deprecated: Please use [diarkis.IsTerminating]

func OnSIGHUP deprecated

func OnSIGHUP(callback func())

OnSIGHUP Registers a callback function on SIGHUP signal

Deprecated: Please use [diarkis.OnSIGHUP]

func OnSIGUSR1 deprecated

func OnSIGUSR1(callback func())

OnSIGUSR1 Registers a callback function on SIGUSR1 signal

Deprecated: Please use [diarkis.OnSIGUSR1NoTask]

func OnSIGUSR2 deprecated

func OnSIGUSR2(callback func())

OnSIGUSR2 Registers a callback function on SIGUSR2 signal

Deprecated: Please use [diarkis.OnSIGUSR2NoTask]

func OnStart deprecated

func OnStart(task func())

OnStart Registers a callback on process start to be executed BEFORE the process is ready

Deprecated: Please use [diarkis.OnStart]

func OnStop deprecated

func OnStop(cb func(ctx context.Context, done func(error)))

OnStop registers a callback on process stop to be executed BEFORE termination tasks are executed

Deprecated: Please use [diarkis.OnStop]

func OnTerminate deprecated

func OnTerminate(task func(ctx context.Context, next func(error)))

OnTerminate Registers a callback on process stop to be executed BEFORE the process termination

Deprecated: Please use [diarkis.OnTerminate]

func Start deprecated

func Start()

Start Starts the process

Deprecated: Please use [diarkis.Start]

func Stop deprecated

func Stop()

Stop Stops the process with exit code 0

Deprecated: Please use [diarkis.Stop]

func StopWithCallback deprecated

func StopWithCallback(done func())

StopWithCallback Stops the process and calls `done` function when the stopping process is finished.

Deprecated: Please use [diarkis.StopWithCallback]

func StopWithError deprecated

func StopWithError(err error)

StopWithError Stops the process with an error and exit code 1

Deprecated: Please use [diarkis.StopWithError]