aboutsummaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/config.go
blob: c69dc794a325f368f124e7909f6f1f45f86d36e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// +build varlink

package varlinkapi

import (
	"github.com/containers/libpod/cmd/podman/cliconfig"
	"github.com/containers/libpod/libpod"
	iopodman "github.com/containers/libpod/pkg/varlink"
	"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)
}