pkg/api: remove deadcode

One might think Close() should be called but we are already using
Shutdown() which is the graceful way to stop the server so we don't
actually need Close().

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2025-06-18 13:24:01 +02:00
parent 75bad52af5
commit 9d328d8782
5 changed files with 0 additions and 67 deletions

View File

@ -50,14 +50,6 @@ const (
// shutdownOnce ensures Shutdown() may safely be called from several go routines
var shutdownOnce sync.Once
// NewServer will create and configure a new API server with all defaults
func NewServer(runtime *libpod.Runtime) (*APIServer, error) {
return newServer(runtime, nil, entities.ServiceOptions{
CorsHeaders: DefaultCorsHeaders,
Timeout: DefaultServiceDuration,
})
}
// NewServerWithSettings will create and configure a new API server using provided settings
func NewServerWithSettings(runtime *libpod.Runtime, listener net.Listener, opts entities.ServiceOptions) (*APIServer, error) {
return newServer(runtime, listener, opts)
@ -298,8 +290,3 @@ func (s *APIServer) Shutdown(halt bool) error {
})
return nil
}
// Close immediately stops responding to clients and exits
func (s *APIServer) Close() error {
return s.Server.Close()
}