breaker

package
v3.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package breaker provides OSSignals struct for OS signals handling (with context).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OSSignals

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

func NewOSSignals

func NewOSSignals(ctx context.Context) OSSignals

func (*OSSignals) Stop

func (oss *OSSignals) Stop()

Stop system signals listening.

func (*OSSignals) Subscribe

func (oss *OSSignals) Subscribe(onSignal func(os.Signal), signals ...os.Signal)

Subscribe for some of system signals (call Stop for stopping).

Jump to

Keyboard shortcuts

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