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

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)
}

type VarlinkCall struct {
	*iopodman.VarlinkCall
}