Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qmp: allow NewLibvirtMonitor to utilize multiple libvirt "drivers" #29

Closed
mdlayher opened this issue May 2, 2016 · 1 comment
Closed

Comments

@mdlayher
Copy link
Contributor

mdlayher commented May 2, 2016

In order to avoid exposing too many options for qmp.Monitor types that interact with libvirt, we may be able to mask them all behind a new parameter in the qmp.NewLibvirtMonitor constructor.

Currently, the constructor looks like:

func NewLibvirtMonitor(uri, domain string) (*Libvirt, error)

The proposed constructor could be something like:

func NewLibvirtMonitor(driver LibvirtDriver, uri, domain string) (*Libvirt, error) {

Where driver could be one of the following:

type LibvirtDriver int

const (
    LibvirtDriverShell LibvirtDriver = iota
    LibvirtDriverRPC   LibvirtDriver
    LibvirtDriverCgo   LibvirtDriver
)

The shell driver is already implemented, and the native RPC driver is well underway. The cgo driver could be added in a future PR, and guarded with build tags to make it a no-op unless compiled with the correct tags.

@mdlayher mdlayher changed the title Allow qmp.NewLibvirtMonitor to utilize multiple libvirt "drivers" qmp: allow NewLibvirtMonitor to utilize multiple libvirt "drivers" May 3, 2016
@mdlayher
Copy link
Contributor Author

This probably doesn't make much sense anymore since the shell and RPC drivers have totally different signatures. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant