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

add shutdown func to interface
This commit is contained in:
Will Browne
2024-06-06 15:18:54 +01:00
committed by GitHub
parent 0e62c200dd
commit 7d8722b561
3 changed files with 16 additions and 0 deletions
+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
}