API server: Add shutdown func to interface (#88827)

add shutdown func to interface
This commit is contained in:
Will Browne authored and GitHub committed 2024-06-06 15:18:54 +01:00
1 parent 0e62c200dd
commit 7d8722b561
3 files changed
+16

No files matched your search

+2
View File
@@ -80,6 +80,8 @@ func newCommandStartExampleAPIServer(o *APIServerOptions, stopCh <-chan struct{}
tracer.InitTracer(o.Options.TracingOptions.TracingService)
}
defer o.factory.Shutdown()
if err := o.RunAPIServer(config, stopCh); err != nil {
return err
}