func StartListeningForActual(l logger.Logger, c *cli.Context) { conf := loadConfig(l, c) messageBus := connectToMessageBus(l, conf) store := connectToStore(l, conf) listener := actualstatelistener.New(conf, messageBus, store, timeprovider.NewTimeProvider(), l) listener.Start() l.Info("Listening for Actual State", nil) select {} }
func StartListeningForActual(l logger.Logger, conf *config.Config) { messageBus := connectToMessageBus(l, conf) store, usageTracker := connectToStoreAndTrack(l, conf) acquireLock(l, conf, "listener") listener := actualstatelistener.New(conf, messageBus, store, usageTracker, metricsaccountant.New(store), buildClock(l), l, ) listener.Start() l.Info("Listening for Actual State") select {} }