shutdown

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CancelChan chan os.Signal

Channel to receive shutdown signal

View Source
var CriticalWaitGroup *sync.WaitGroup

Wait group used in graceful shutdown. Shutdown process will wait for this wait group to be done before canceling the context.

View Source
var Finished chan struct{}

It will be closed when the application has finished the shutting down process

View Source
var Started chan struct{}

It will be closed when shutdown starts the shutting down process

View Source
var WaitGroup *sync.WaitGroup

Wait group used in graceful shutdown. Shutdown will wait for this wait group to be done after canceling the context.

Functions

func Finish

func Finish()

func HasFinished

func HasFinished() bool

It will return true if the application has finished the shutting down process Used in tests

func Ongoing

func Ongoing() bool

It will return true if the application is shutting down or if the application has finished the shutting down process

func PerformShutdown

func PerformShutdown(ctx context.Context, cancel context.CancelFunc, server *grpc.Server)

func Reset

func Reset()

Function used to reset shutdown process for tests

func Start

func Start()

Types

This section is empty.

Jump to

Keyboard shortcuts

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