interrupt

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSignalChannel

func NewSignalChannel() (<-chan os.Signal, func())

NewSignalChannel 返回一个用于中断信号的新通道。

调用返回的函数以取消发送到此通道。

func WithCancel

func WithCancel(ctx context.Context) (context.Context, context.CancelFunc)

WithCancel 返回一个在接收到中断信号时被取消的上下文。

Types

This section is empty.

Jump to

Keyboard shortcuts

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