func (s *Service) Close() error {
	var errors error
	s.logger.Info("cancelling context")
	s.cancel()
	// wait for pending goroutines to exit
	s.logger.Info("waiting for existing goroutines to exit")
	s.wg.Wait()
	s.logger.Info("closing multicaller")
	s.mc.Close()
	s.logger.Info("closing event watcher")
	// close eventwatcher/bclient
	s.ew.Close()
	// close db
	s.logger.Info("closing database")
	if err := s.db.Close(); err != nil {
		errors = multierr.Combine(errors, err)
	}
	s.logger.Info("shutdown process finished, goodbye...")
	return errors
}
// Close shuts down all internal modules returning any errors encountered from shutdown
Close shuts down all internal modules returning any errors encountered from shutdown
// Close shuts down all internal modules returning any errors encountered from shutdown
func (s *Service) Close() error {
	var errors error
	s.logger.Info("cancelling context")
	s.cancel()
	s.logger.Info("waiting for existing goroutines to exit")
	s.wg.Wait()
	s.logger.Info("closing multicaller")
	s.mc.Close()
	s.logger.Info("closing event watcher")
	s.ew.Close()
	s.logger.Info("closing database")
	if err := s.db.Close(); err != nil {
		errors = multierr.Combine(errors, err)
	}
	s.logger.Info("shutdown process finished, goodbye...")
	return errors
}
func ( s * Service ) Close ( ) error { var errors error s . logger . Info ( " " ) s . cancel ( ) s . logger . Info ( " " ) s . wg . Wait ( ) s . logger . Info ( " " ) s . mc . Close ( ) s . logger . Info ( " " ) s . ew . Close ( ) s . logger . Info ( " " ) if err := s . db . Close ( ) ; err != nil { errors = multierr . Combine ( errors , err ) } s . logger . Info ( " " ) return errors }
Close shuts down all internal modules returning any errors encountered from shutdown
Close shuts down all internal modules returning any errors encountered from shutdown
// wait for pending goroutines to exit // close eventwatcher/bclient // close db