MCPcopy
hub / github.com/deepops-ai/deepops / Close

Method Close

backend/internal/server.go:203–223  ·  view source on GitHub ↗

Close ...

()

Source from the content-addressed store, hash-verified

201
202// Close ...
203func (s *Server) Close() error {
204 var waited time.Duration
205 if config.Data.Common.IsProd {
206 waited = 5 * time.Second
207 } else {
208 waited = 1 * time.Second
209 }
210
211 if err := ot.TraceProvider.Shutdown(context.Background()); err != nil {
212 logger.Warn("Error shutting down tracer provider: %v", "error", err)
213 }
214
215 if err := ot.MeterProvider.Shutdown(context.Background()); err != nil {
216 logger.Warn("Error shutting down meter provider: %v", "error", err)
217 }
218
219 close(s.closeCh)
220
221 time.Sleep(waited)
222 return nil
223}
224
225// Cors is a gin middleware for cross domain.
226func Cors() gin.HandlerFunc {

Callers 15

QueryDashboardsByTeamIdFunction · 0.80
GetVariablesFunction · 0.80
GetDatasourcesFunction · 0.80
ProxyFunction · 0.80
ProxyDatasourceFunction · 0.80
GetTeamDashboardsFunction · 0.80
GetSimpleListFunction · 0.80
GetAllStarredFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected