Files
podman/internal/domain/infra/runtime_abi.go
Matt Heon 34166fc004 Bump Go version to v6
Tremendous amount of changes in here, but all should amount to
the same thing: changing Go import paths from v5 to v6.

Also bumped go.mod to github.com/containers/podman/v6 and updated
version to v6.0.0-dev.

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-10-23 11:00:15 -04:00

34 lines
1.0 KiB
Go

//go:build !remote
package infra
import (
"context"
"fmt"
ientities "github.com/containers/podman/v6/internal/domain/entities"
"github.com/containers/podman/v6/internal/domain/infra/tunnel"
"github.com/containers/podman/v6/pkg/bindings"
"github.com/containers/podman/v6/pkg/domain/entities"
)
// NewTestingEngine factory provides a libpod runtime for testing-specific operations
func NewTestingEngine(facts *entities.PodmanConfig) (ientities.TestingEngine, error) {
switch facts.EngineMode {
case entities.ABIMode:
r, err := NewLibpodTestingRuntime(facts.FlagSet, facts)
return r, err
case entities.TunnelMode:
ctx, err := bindings.NewConnectionWithOptions(context.Background(), bindings.Options{
URI: facts.URI,
Identity: facts.Identity,
TLSCertFile: facts.TLSCertFile,
TLSKeyFile: facts.TLSKeyFile,
TLSCAFile: facts.TLSCAFile,
Machine: facts.MachineMode,
})
return &tunnel.TestingEngine{ClientCtx: ctx}, err
}
return nil, fmt.Errorf("runtime mode '%v' is not supported", facts.EngineMode)
}