sync

package
v0.0.0-...-6835649 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShutdownGuard

type ShutdownGuard struct {
	sync.Mutex
	sync.WaitGroup
	ShuttingDown chan struct{}
}

ShutdownGuard facilitates coordinating the shutdown of multiple components.

func NewShutdownGuard

func NewShutdownGuard() *ShutdownGuard

NewShutdownGuard creates a new ShutdownGuard.

func (*ShutdownGuard) InitiateShutdown

func (s *ShutdownGuard) InitiateShutdown()

InitiateShutdown signals to all components that they should begin shutting down.

func (*ShutdownGuard) ShutdownAndDone

func (s *ShutdownGuard) ShutdownAndDone()

ShutdownAndDone initiates a shutdown and signals completion.

func (*ShutdownGuard) ShutdownAndWait

func (s *ShutdownGuard) ShutdownAndWait()

ShutdownAndWait initiates a shutdown, and waits for all components to finish.

Jump to

Keyboard shortcuts

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