Exemplo n.º 1
0
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)
}
Exemplo n.º 2
0
func sendManifestFail(a *app.App, reason string) {
	body := make(map[string]interface{})
	body["message"] = reason
	a.Send("APP_MANIFEST_FAIL", body)
}