Discover Packages
github.com/honeycombio/startstop
package
module
Version:
v0.0.0
Opens a new window with list of versions in this module.
Published: Oct 18, 2019
License: 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
Documentation
¶
Package startstop provides automatic Start/Stop for inject eliminating the
necessity for manual ordering.
Start starts the graph, in the right order. Start will call Start if an
object satisfies the associated interface.
Stop stops the graph, in the right order. Stop will call Stop if an
object satisfies the associated interface. Unlike Start(), logs and
continues if a Stop call returns an error.
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.
Starter defines the Start method. Objects satisfying this interface will be
started by Start
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.