Versions in this module Expand all Collapse all v1 v1.4.1 Jun 23, 2020 Changes in this version + var ErrShutterWasAlreadyDown = errors.New("saferun was called on an already-shutdown shutter") + type Option = func(shutter *Shutter) + func RegisterOnTerminated(f func(error)) Option + func RegisterOnTerminating(f func(error)) Option type Shutter + func (s *Shutter) IsTerminated() bool + func (s *Shutter) IsTerminating() bool + func (s *Shutter) LockedInit(fn func() error) (err error) + func (s *Shutter) OnTerminated(f func(error)) + func (s *Shutter) OnTerminating(f func(error)) + func (s *Shutter) Terminated() <-chan struct{} + func (s *Shutter) Terminating() <-chan struct{} v1.1.0 Nov 23, 2018 Changes in this version type Shutter + func (s *Shutter) SetCallback(f func()) v1.0.0 Nov 2, 2018 Changes in this version + type Shutter struct + func New(f func()) *Shutter + func (s *Shutter) Done() <-chan struct{} + func (s *Shutter) Err() error + func (s *Shutter) IsDown() bool + func (s *Shutter) Shutdown(err error)