INNER CODE UNIT · Go

func

moleculer-go/moleculer · broker/broker.go:166

func (broker *ServiceBroker) LocalBus() *bus.Emitter {
	return broker.localBus
}

// stopService stop the service.
func (broker *ServiceBroker) stopService(svc *service.Service) {
	broker.middlewares.CallHandlers("serviceStopping", svc)
	svc.Stop(broker.rootContext.ChildActionContext("service.stop", payload.Empty()))
	broker.middlewares.CallHandlers("serviceStopped", svc)
}

// applyServiceConfig apply broker config to the service configuration
// settings is an import config copy from broker to the service.
func (broker *ServiceBroker) applyServiceConfig(svc *service.Service) {
	if bkrConfig, exists := broker.config.Services[svc.Name()]; exists {
		svcConfig, ok := bkrConfig.(map[string]interface{})
		if ok {
			_, ok := svcConfig["settings"]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…