1
0
Fork 0

Define an empty Shutdown function on base daemon

This commit is contained in:
Gregory Eremin 2015-10-27 19:54:08 +03:00
parent 7af5b18d85
commit 79cb745a5d
3 changed files with 2 additions and 6 deletions

View File

@ -164,6 +164,8 @@ func (d *BaseDaemon) Logf(format string, v ...interface{}) {
d.logger.Printf(format, v...)
}
func (d *BaseDaemon) Shutdown() {}
// String returns the name of the Deamon unerlying struct.
func (d *BaseDaemon) String() string {
if d.name == "" {

View File

@ -22,9 +22,6 @@ func (n *NumberPrinter) Startup() {
n.SystemProcess("Random Number Generator", n.generateNumbers)
}
// Shutdown is empty due to the lack of cleanup.
func (n *NumberPrinter) Shutdown() {}
func (n *NumberPrinter) generateNumbers() {
for n.Continue() {
if rand.Intn(10) == 0 {

View File

@ -24,6 +24,3 @@ func (p *PriceConsumer) Startup() {
})
p.LimitRate(5, time.Second)
}
// Shutdown is empty because PriceConsumer requires no cleanup upon exiting.
func (p *PriceConsumer) Shutdown() {}