sigaction

package
v0.6.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 19

Documentation

Overview

* Apache License 2.0 * * Copyright (c) 2022, Austin Zhai * All rights reserved.

Index

Constants

This section is empty.

Variables

View Source
var (
	ReservedFiniSignals = []os.Signal{
		os.Kill,
		os.Interrupt,
		syscall.SIGTERM,
	}
)

Functions

This section is empty.

Types

type Notifier

type Notifier interface {
	Notify(os.Signal)
}

type Signal

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

func NewSignal

func NewSignal(options ...SignalOption) *Signal

func (*Signal) Add

func (sig *Signal) Add(sg os.Signal, nts ...Notifier)

func (*Signal) Wait

func (sig *Signal) Wait(ctx context.Context)

type SignalOption

type SignalOption func(*Signal)

func OptionSignalCancel

func OptionSignalCancel(cancel context.CancelFunc) SignalOption

Jump to

Keyboard shortcuts

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