MCPcopy Create free account
hub / github.com/InferCore/InferCore / Shutdown

Method Shutdown

internal/server/server.go:152–163  ·  view source on GitHub ↗

Shutdown releases telemetry resources (e.g. OTLP batch flush). Call on process exit.

(ctx context.Context)

Source from the content-addressed store, hash-verified

150
151// Shutdown releases telemetry resources (e.g. OTLP batch flush). Call on process exit.
152func (s *Server) Shutdown(ctx context.Context) error {
153 if s.ledger != nil {
154 _ = s.ledger.Close()
155 }
156 type shutdowner interface {
157 Shutdown(context.Context) error
158 }
159 if x, ok := s.telemetry.(shutdowner); ok {
160 return x.Shutdown(ctx)
161 }
162 return nil
163}
164
165func (s *Server) effectiveInfercoreAPIKey() string {
166 if k := strings.TrimSpace(os.Getenv("INFERCORE_API_KEY")); k != "" {

Callers 1

serveCmdFunction · 0.95

Calls 2

CloseMethod · 0.65
ShutdownMethod · 0.65

Tested by

no test coverage detected