MCPcopy
hub / github.com/gofiber/fiber / initServices

Method initServices

services.go:49–57  ·  view source on GitHub ↗

initServices If the app is configured to use services, this function registers a post shutdown hook to shutdown them after the server is closed. This function panics if there is an error starting the services.

()

Source from the content-addressed store, hash-verified

47// a post shutdown hook to shutdown them after the server is closed.
48// This function panics if there is an error starting the services.
49func (app *App) initServices() {
50 if !app.hasConfiguredServices() {
51 return
52 }
53
54 if err := app.startServices(app.servicesStartupCtx()); err != nil {
55 panic(err)
56 }
57}
58
59// servicesStartupCtx Returns the context for the services startup.
60// If the ServicesStartupContextProvider is not set, it returns a new background context.

Callers 1

initMethod · 0.95

Calls 3

hasConfiguredServicesMethod · 0.95
startServicesMethod · 0.95
servicesStartupCtxMethod · 0.95

Tested by

no test coverage detected