utils

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shutdown

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

Shutdown is a struct that coordinates shutdowns

func NewShutdown

func NewShutdown() *Shutdown

NewShutdown returns a new Shutdown struct

func (*Shutdown) Begin

func (s *Shutdown) Begin(err error)

Begin marks shutdown as started

func (*Shutdown) Complete

func (s *Shutdown) Complete()

Complete marks shutdown as finished

func (*Shutdown) Error added in v0.5.31

func (s *Shutdown) Error() error

Error returns error that initialized the shutdown if any

func (*Shutdown) WaitBegin

func (s *Shutdown) WaitBegin()

WaitBegin blocks until shutdown is started

func (*Shutdown) WaitBeginCh

func (s *Shutdown) WaitBeginCh() <-chan int

WaitBeginCh returns a channel that programs can block on. The channel will close when the shutdown is started.

func (*Shutdown) WaitComplete

func (s *Shutdown) WaitComplete()

WaitComplete blocks until shutdown is finished

Jump to

Keyboard shortcuts

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