Discover Packages
github.com/shutej/dvara
Godeps
_workspace
src
github.com
facebookgo
startstop
package
Version:
v0.0.0-...-fa9593c
Opens a new window with list of versions in this module.
Published: Jan 20, 2015
License: BSD-3-Clause, BSD-3-Clause
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Expand ▾
Collapse ▴
Documentation
¶
Package startstop provides automatic Start/Stop for inject eliminating the
necessity for manual ordering.
Start the graph, in the right order. Objects that don't depend on each other
will be started in parallel. Start will call Start or Open if an object
satisfies the associated interface.
Stop the graph, in the right order. Objects that don't depend on each other
will be stopped in parallel. Stop will call Stop or Close if an object
satisfies the associated interface.
type Closer interface {
Close() error
}
Closer defines the Close method, objects satisfying this interface will be
closed by Stop.
type Logger interface {
Debugf(f string , args ...interface{})
Errorf(f string , args ...interface{})
}
Logger is used by Start/Stop to provide debug and error logging.
type Opener interface {
Open() error
}
Opener defines the Open method, objects satisfying this interface will be
opened by Start.
type Starter interface {
Start() error
}
Starter defines the Start method, objects satisfying this interface will be
started by Start.
type Stopper interface {
Stop() error
}
Stopper defines the Stop method, objects satisfying this interface will be
stopped by Stop.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.