mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00

Moving from Go module v4 to v5 prepares us for public releases. Move done using gomove [1] as with the v3 and v4 moves. [1] https://github.com/KSubedi/gomove Signed-off-by: Matt Heon <mheon@redhat.com>
22 lines
586 B
Go
22 lines
586 B
Go
package libpod
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/containers/podman/v5/libpod"
|
|
"github.com/containers/podman/v5/pkg/api/handlers/utils"
|
|
api "github.com/containers/podman/v5/pkg/api/types"
|
|
"github.com/containers/podman/v5/pkg/domain/infra/abi"
|
|
)
|
|
|
|
func GetInfo(w http.ResponseWriter, r *http.Request) {
|
|
runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime)
|
|
containerEngine := abi.ContainerEngine{Libpod: runtime}
|
|
info, err := containerEngine.Info(r.Context())
|
|
if err != nil {
|
|
utils.InternalServerError(w, err)
|
|
return
|
|
}
|
|
utils.WriteResponse(w, http.StatusOK, info)
|
|
}
|