signals

package
v0.0.0-...-a77b288 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package signals exposes signal handler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler defines signal handler properties.

func NewSignalHandler

func NewSignalHandler(timeoutSeconds int) *Handler

NewSignalHandler creates a new Handler using given properties.

func (*Handler) GetState

func (h *Handler) GetState() int

GetState returns has signal been recieved.

func (*Handler) Register

func (h *Handler) Register()

Register starts handling signals.

func (*Handler) Reset

func (h *Handler) Reset()

type Signal

type Signal interface {
	GetState() int
	Register()
}

Signal is an interface that implements signal handling.

Jump to

Keyboard shortcuts

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