1
0
Fork 0

Add a function to clear daemons list

This commit is contained in:
Gregory Eremin 2016-01-25 01:39:48 +03:00
parent 08db309f80
commit 437c60b018
1 changed files with 6 additions and 0 deletions

View File

@ -98,6 +98,12 @@ func (s *Shezmu) AddDaemon(d Daemon) {
s.daemons = append(s.daemons, d)
}
// ClearDaemons clears the list of added daemons. StopDaemons() function MUST be
// called before calling ClearDaemons().
func (s *Shezmu) ClearDaemons() {
s.daemons = []Daemon{}
}
// StartDaemons starts all registered daemons.
func (s *Shezmu) StartDaemons() {
s.Logger.Printf("Starting %d workers", s.NumWorkers)