Documentation ¶
Overview ¶
Package startstop provides automatic Start/Stop for inject eliminating the necessity for manual ordering.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
Start the graph, in the right order. Start will call Start or Open if an object satisfies the associated interface.
func Stop ¶
Stop the graph, in the right order. Stop will call Stop or Close if an object satisfies the associated interface.
Types ¶
type Closer ¶
type Closer interface {
Close() error
}
Closer defines the Close method, objects satisfying this interface will be closed by Stop.
type Logger ¶
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 ¶
type Opener interface {
Open() error
}
Opener defines the Open method, objects satisfying this interface will be opened by Start.
Click to show internal directories.
Click to hide internal directories.