signals

package
v0.0.0-...-2db79e0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2017 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.

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