|
|
|
@ -36,6 +36,8 @@ func (cs *RandomGeneration) Run(stopChan chan struct{}, stoppedChan chan struct{ |
|
|
|
|
select { |
|
|
|
|
default: |
|
|
|
|
utils.GetLogInstance().Info("Running random generation") |
|
|
|
|
// Write some logic here.
|
|
|
|
|
cs.DoRandomGeneration() |
|
|
|
|
case <-stopChan: |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
@ -43,6 +45,11 @@ func (cs *RandomGeneration) Run(stopChan chan struct{}, stoppedChan chan struct{ |
|
|
|
|
}() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// DoRandomGeneration does random generation.
|
|
|
|
|
func (cs *RandomGeneration) DoRandomGeneration() { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// StopService stops random generation service.
|
|
|
|
|
func (cs *RandomGeneration) StopService() { |
|
|
|
|
utils.GetLogInstance().Info("Stopping random generation service.") |
|
|
|
|