func main() { runtime.GOMAXPROCS(runtime.NumCPU()) subscription := account.NewEtcdSubscription("/maestro_development", &db.EtcdConfig{Machines: []string{"http://localhost:2379"}}) api := api.NewApi(mem.New(), subscription) api.AddHook(account.Hook{ Name: "backstage-maestro-slack", Team: account.ALL_TEAMS, Events: []string{"service.create"}, Config: account.HookConfig{Address: "http://localhost:8001"}, // Text: `{"username": "******", "channel": "#backstage", // "icon_url": "http://www.albertoleal.me/images/maestro-pq.png", // "text": "Um novo serviço foi criado no Backstage Maestro, com o seguinte subdomÃnio: {{.Service.Subdomain}}."}`, }) api.ListenEvents() api.Run() }
// Run the tests in memory func setUpMemoryTest(s *S) { s.store = mem.New() }
// // Run the tests in memory func setUpMemoryTest() account.Storable { store := mem.New() account.Storage(store) return store }
// Run the tests in memory func setUpMemoryTest(s *S) { account.Storage(mem.New()) }