mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-25 01:37:55 +00:00
We intend to migrate to the cobra cli from urfave/cli because the project is more well maintained. There are also some technical reasons as well which extend into our remote client work. Signed-off-by: baude <bbaude@redhat.com>
21 lines
578 B
Go
21 lines
578 B
Go
package varlinkapi
|
|
|
|
import (
|
|
"github.com/containers/libpod/cmd/podman/cliconfig"
|
|
iopodman "github.com/containers/libpod/cmd/podman/varlink"
|
|
"github.com/containers/libpod/libpod"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// LibpodAPI is the basic varlink struct for libpod
|
|
type LibpodAPI struct {
|
|
Cli *cobra.Command
|
|
iopodman.VarlinkInterface
|
|
Runtime *libpod.Runtime
|
|
}
|
|
|
|
// New creates a new varlink client
|
|
func New(cli *cliconfig.PodmanCommand, runtime *libpod.Runtime) *iopodman.VarlinkInterface {
|
|
lp := LibpodAPI{Cli: cli.Command, Runtime: runtime}
|
|
return iopodman.VarlinkNew(&lp)
|
|
}
|