mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08: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>
22 lines
578 B
Go
22 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)
|
|
}
|