go-qemu: github.com/digitalocean/go-qemu/qmp/qmptest Index | Files

package qmptest

import "github.com/digitalocean/go-qemu/qmp/qmptest"

Package qmptest provides types which assist in testing interactions with package qmp.

Index

Package Files

qmptest.go

func NewMonitor Uses

func NewMonitor(runFunc RunFunc) qmp.Monitor

NewMonitor creates a qmp.Monitor that invokes runFunc whenever its Run method is called. All other methods are a no-op, and return nil.

type RunFunc Uses

type RunFunc func(cmd qmp.Command) (results interface{}, err error)

A RunFunc is a function invoked to process a qmp.Command. Any data returned by results is marshaled into JSON and returned to the caller.

Package qmptest imports 2 packages (graph). Updated 2016-10-18. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).