Documentation ¶
Overview ¶
Inspired by Cockroachdb's stop util.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Stopper ¶
type Stopper struct {
// contains filtered or unexported fields
}
func NewStopper ¶
func NewStopper(callback func()) *Stopper
func (*Stopper) IsStopping ¶
func (*Stopper) ShouldStop ¶
func (s *Stopper) ShouldStop() <-chan struct{}
Click to show internal directories.
Click to hide internal directories.