shutdown

package
v0.0.0-...-3a0566b Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2015 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package shutdown contains data and methods to support safe shutdown.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RoutineDone

func RoutineDone(id ShutdownId)

Marks that a routine has finished shutdown

func Shutdown

func Shutdown()

Requests shutdown, and waits until shutdown has completed

func ShutdownOnSigint

func ShutdownOnSigint()

Blocks and requests shutdown on receiving SIGINT, unblocks on completion of shutdown.

Types

type ShutdownId

type ShutdownId uint64

A unique ID to represent a process' shutdown listener request.

func AddShutdownListener

func AddShutdownListener(routineName string) (ShutdownId, chan bool)

Records that a module will be waiting for shutdown. Returns A channel to listen for shutdown requests.

Jump to

Keyboard shortcuts

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