signal

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitTermSignalForGracefulRestart

func WaitTermSignalForGracefulRestart(sigs ...*TermSignal)

Types

type TermSignal

type TermSignal struct {
	// contains filtered or unexported fields
}

func NewTermSignal

func NewTermSignal() *TermSignal

func (*TermSignal) CancelCallbacksRegistry

func (s *TermSignal) CancelCallbacksRegistry(callbacks ...func())

func (*TermSignal) Close

func (s *TermSignal) Close(wg *sync.WaitGroup)

func (*TermSignal) GetStopChannel

func (s *TermSignal) GetStopChannel() *chan struct{}

GetStopChannel 不用手动关闭这个 channel, 关闭函数最后会关闭 channel

func (*TermSignal) GetStopCtx

func (s *TermSignal) GetStopCtx() *context.Context

Jump to

Keyboard shortcuts

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