MCPcopy Create free account
hub / github.com/cloudwan/gohan / publishEvent

Function publishEvent

cli/migrate.go:284–313  ·  view source on GitHub ↗
(envName string, modifiedSchemas []string, eventName string, syncETCDEvent bool, eventTimeout time.Duration)

Source from the content-addressed store, hash-verified

282}
283
284func publishEvent(envName string, modifiedSchemas []string, eventName string, syncETCDEvent bool, eventTimeout time.Duration) error {
285 config := util.GetConfig()
286
287 rawDB, err := db.CreateFromConfig(config)
288
289 if err != nil {
290 log.Fatal(err)
291 }
292
293 db := &server.DbSyncWrapper{DB: rawDB}
294
295 sync, err := sync_util.CreateFromConfig(config)
296
297 if err != nil {
298 log.Fatal(err)
299 }
300
301 ident, err := middleware.CreateIdentityServiceFromConfig(config)
302
303 if err != nil {
304 log.Fatal(err)
305 }
306
307 envManager := extension.GetManager()
308 manager := schema.GetManager()
309
310 publishEventWithOptions(envName, modifiedSchemas, eventName, syncETCDEvent, eventTimeout, db, manager, envManager, sync, ident)
311
312 return nil
313}

Callers 1

emitPostMigrateEventFunction · 0.85

Calls 2

publishEventWithOptionsFunction · 0.85
FatalMethod · 0.80

Tested by

no test coverage detected