func sendManifestOkAndDependencies(a *app.App) { // send manifest ok body := make(map[string]interface{}) body["instanceId"] = a.Manifest.InstanceId a.Send("APP_MANIFEST_OK", body) // send dependencies body = make(map[string]interface{}) for _, dep := range a.Manifest.Dependencies { inner := make(map[string]string) body[dep.Name] = inner for _, provider := range registry.GetProviders(dep) { inner[provider.Manifest.InstanceId] = provider.StatusString() } } a.Send("APP_DEPENDENCY", body) }
func sendManifestFail(a *app.App, reason string) { body := make(map[string]interface{}) body["message"] = reason a.Send("APP_MANIFEST_FAIL", body) }