mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-06 23:57:48 +00:00
With the advent of Podman 2.0.0 we crossed the magical barrier of go modules. While we were able to continue importing all packages inside of the project, the project could not be vendored anymore from the outside. Move the go module to new major version and change all imports to github.com/containers/libpod/v2. The renaming of the imports was done via gomove [1]. [1] https://github.com/KSubedi/gomove Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
29 lines
782 B
Go
29 lines
782 B
Go
// +build !remote
|
|
|
|
package infra
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/containers/libpod/v2/pkg/domain/entities"
|
|
"github.com/containers/libpod/v2/pkg/domain/infra/abi"
|
|
flag "github.com/spf13/pflag"
|
|
)
|
|
|
|
// ContainerEngine Proxy will be EOL'ed after podman is separated from libpod repo
|
|
|
|
func NewLibpodRuntime(flags *flag.FlagSet, opts *entities.PodmanConfig) (entities.ContainerEngine, error) {
|
|
r, err := GetRuntime(context.Background(), flags, opts)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &abi.ContainerEngine{Libpod: r}, nil
|
|
}
|
|
|
|
func NewLibpodImageRuntime(flags *flag.FlagSet, opts *entities.PodmanConfig) (entities.ImageEngine, error) {
|
|
r, err := GetRuntime(context.Background(), flags, opts)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &abi.ImageEngine{Libpod: r}, nil
|
|
}
|