Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/digitalocean/go-qemu
/ functions
Functions
916 in github.com/digitalocean/go-qemu
⨍
Functions
916
◇
Types & classes
431
↓ 175 callers
Method
Run
(command []byte)
qmp/qmp.go:34
↓ 141 callers
Function
Map
Map converts one parser to another parser.
qapi-schema/internal/parse/parse.go:67
↓ 81 callers
Function
All3
All3 requires all three parsers to succeed and it returns a tuple of the parsed objects.
qapi-schema/internal/parse/parse.go:175
↓ 43 callers
Function
exactStrParser
(exactly string)
qapi-schema/grammar.go:967
↓ 31 callers
Function
OneOf
OneOf tries a list of parsers and if one of them succeeds, returns that parser.
qapi-schema/internal/parse/parse.go:80
↓ 30 callers
Function
testDomain
( t *testing.T, fn func(qmp.Command) (interface{}, error), options ...testDomainOptFn, )
qemu/domain_test.go:607
↓ 18 callers
Function
addName
(api, need map[name]interface{}, name name)
internal/qmp-gen/generate.go:120
↓ 18 callers
Function
atLeastOneSeparatedBy
(elemParser parse.Parser[T], sepParser parse.Parser[U])
qapi-schema/grammar.go:936
↓ 15 callers
Method
String
()
qmp/qmp.go:91
↓ 11 callers
Method
Close
Close cleans up internal resources of a Domain and disconnects the underlying qmp.Monitor. Close must be called when done with a Domain to avoid leak
qemu/domain.go:61
↓ 10 callers
Function
Exactly
Exactly consumes the exact token from the input stream or fails.
qapi-schema/internal/parse/parse.go:42
↓ 9 callers
Function
Parse
Parse applies the given parser against the input stream.
qapi-schema/internal/parse/parse.go:19
↓ 9 callers
Method
Run
Run executes the given QMP command against the domain. The returned []byte is the raw output from the QMP monitor. Run should be used with caution, a
qemu/domain.go:231
↓ 7 callers
Function
NewLibvirtRPCMonitor
NewLibvirtRPCMonitor configures a new Libvirt RPC Monitor connection. The provided domain should be the name of the domain as seen by libvirt, e.g., s
qmp/rpc.go:37
↓ 7 callers
Method
listen
listen listens for incoming data from a QEMU monitor socket. It determines if the data is an asynchronous event or a response to a command, and retur
qmp/socket.go:172
↓ 6 callers
Method
remaining
()
qapi-schema/internal/parse/parse.go:214
↓ 5 callers
Function
All2
All2 requires both parsers to succeed and it returns a tuple of the parsed objects.
qapi-schema/internal/parse/parse.go:145
↓ 5 callers
Method
Events
(context.Context)
qmp/qmp.go:35
↓ 5 callers
Function
NewDomain
NewDomain returns a new QEMU domain identified by the given name. QMP communication is handled by the provided monitor socket.
qemu/domain.go:466
↓ 5 callers
Method
readRune
()
qapi-schema/internal/lex/lex.go:74
↓ 4 callers
Method
Commit
Commit synchronously merges an overlay image onto a block device's root backing image. Once the operation is complete, CompleteJob() must be called to
qemu/block.go:162
↓ 4 callers
Method
Connect
Connect establishes communication with the libvirt server. The underlying libvirt socket connection must be previously established.
qmp/rpc.go:48
↓ 4 callers
Method
Connect
()
qmp/qmp.go:32
↓ 4 callers
Method
DomainNames
()
hypervisor/hypervisor.go:43
↓ 4 callers
Method
Domains
Domains retrieves all virtual machines which reside on a given hypervisor, connecting to the monitor socket of each machine. Each Domain's Close meth
hypervisor/hypervisor.go:57
↓ 4 callers
Method
Fields
(api map[name]interface{})
internal/qmp-gen/types.go:124
↓ 4 callers
Function
New
New creates a new Hypervisor using the input Driver.
hypervisor/hypervisor.go:33
↓ 4 callers
Function
NewRPCDriver
NewRPCDriver configures a hypervisor driver using Libvirt RPC. The provided newConn function should return an established network connection with the
hypervisor/rpc.go:74
↓ 4 callers
Function
indent
(s string)
internal/qmp-gen/parse_test.go:203
↓ 4 callers
Function
testHypervisor
( t *testing.T, domains []string, newMonitor monitorFunc, )
hypervisor/hypervisor_test.go:146
↓ 4 callers
Function
waitForSignal
waitForSignal opens a domain's QMP event stream and invokes an input closure to send commands which would create results on that event stream.
qemu/block.go:230
↓ 3 callers
Method
BlockDevices
BlockDevices returns a domain's block devices.
qemu/domain.go:108
↓ 3 callers
Method
Commands
Commands returns all QMP commands supported by the domain.
qemu/domain.go:67
↓ 3 callers
Method
Complete
Complete a running block job. For blockcommit backups, this performs the "pivot" back to the original backing image.
qemu/block.go:197
↓ 3 callers
Method
Disconnect
Disconnect shuts down communication with the libvirt server and closes the underlying net.Conn.
qmp/rpc.go:54
↓ 3 callers
Method
Disconnect
()
qmp/qmp.go:33
↓ 3 callers
Method
Domain
Domain retrieves a single virtual machine from a hypervisor, connecting to its monitor socket. If no virtual machine exists with the given name, an e
hypervisor/hypervisor.go:82
↓ 3 callers
Method
Err
()
qmp/qmp.go:56
↓ 3 callers
Function
NewMonitor
NewMonitor creates a qmp.Monitor that invokes runFunc whenever its Run method is called. All other methods are a no-op, and return nil.
qmp/qmptest/qmptest.go:32
↓ 3 callers
Function
Nothing
Nothing is a parser that always succeeds and doesn't consume input.
qapi-schema/internal/parse/parse.go:203
↓ 3 callers
Method
SimpleType
()
internal/qmp-gen/types.go:253
↓ 3 callers
Method
Status
Status returns the current status of the domain.
qemu/domain.go:291
↓ 3 callers
Method
Version
()
hypervisor/hypervisor.go:49
↓ 3 callers
Function
containsRune
(haystack []rune, needle rune)
qapi-schema/internal/lex/lex.go:134
↓ 3 callers
Function
decodeSocketAddressLegacy
(bs json.RawMessage)
qmp/raw/autogen.go:9533
↓ 3 callers
Function
getQAPI
getQAPI reads a QMP API spec file, from local disk or over HTTP(S).
internal/qmp-gen/types.go:341
↓ 3 callers
Function
noopMonitorFunc
()
hypervisor/hypervisor_test.go:116
↓ 2 callers
Method
BlockDevice
BlockDevice searches a domain for the given block device. If found, a BlockDevice is returned. If the device is not found, the returned error will be
qemu/domain.go:92
↓ 2 callers
Method
Events
Events streams QEMU QMP events. Two channels are returned, the first contains events emitted by the domain. The second is used to signal completion of
qemu/domain.go:367
↓ 2 callers
Method
HasInterfaceField
(api map[name]interface{})
internal/qmp-gen/types.go:110
↓ 2 callers
Function
Lex
Lex lexes the input document into tokens.
qapi-schema/internal/lex/lex.go:10
↓ 2 callers
Function
ManyOf
ManyOf attempts to successfully parse 0 or more times.
qapi-schema/internal/parse/parse.go:95
↓ 2 callers
Method
Mirror
Mirror copies a block device to the given destination. The destination path specified by dest must be absolute.
qemu/block.go:137
↓ 2 callers
Method
NextToken
()
qapi-schema/internal/lex/lex.go:40
↓ 2 callers
Method
PCIDevices
PCIDevices returns a domain's PCI devices.
qemu/domain.go:176
↓ 2 callers
Method
Supported
Supported returns true if the provided command is supported by the domain.
qemu/domain.go:306
↓ 2 callers
Method
SystemPowerdown
SystemPowerdown sends a system power down event to the domain.
qemu/domain.go:322
↓ 2 callers
Method
Version
Version returns the domain's QEMU version.
qemu/domain.go:334
↓ 2 callers
Function
completeParseTree
completeParseTree walks the parse tree and expands the Include statements. It returns the completely resolved parse tree.
internal/qmp-gen/main.go:73
↓ 2 callers
Method
connectDomain
connectDomain opens a monitor socket connection and creates a virtual machine for the machine with the specified name.
hypervisor/hypervisor.go:106
↓ 2 callers
Method
consume
(n int)
qapi-schema/internal/parse/parse.go:218
↓ 2 callers
Function
decodeBlockdevOptions
(bs json.RawMessage)
qmp/raw/autogen.go:2574
↓ 2 callers
Function
decodeStrOrNull
(bs json.RawMessage)
qmp/raw/autogen.go:9775
↓ 2 callers
Function
isAlphaNumeric
(r rune)
qapi-schema/internal/lex/lex.go:130
↓ 2 callers
Function
isWhitespace
(r rune)
qapi-schema/internal/lex/lex.go:124
↓ 2 callers
Function
lowerParseTree
lowerParseTree converts the parsed types from package qapischema into types that are wired up for Go code generation.
internal/qmp-gen/main.go:111
↓ 2 callers
Function
neededTypes
neededTypes returns the subset of API that should be rendered to file. The subset to render is defined as the transitive closure of all types reachab
internal/qmp-gen/generate.go:32
↓ 2 callers
Function
newLexer
(input string)
qapi-schema/internal/lex/lex.go:31
↓ 2 callers
Function
qmpEvent
qmpEvent takes a libvirt DomainEvent and returns the QMP equivalent.
qmp/rpc.go:93
↓ 2 callers
Function
renderAPI
renderAPI generates the Go implementation for the types listed in need.
internal/qmp-gen/generate.go:131
↓ 2 callers
Function
testGenerate
(t *testing.T, in []byte, checkNeededTypes bool)
internal/qmp-gen/parse_test.go:207
↓ 2 callers
Function
testSocket
(t *testing.T)
qmp/socket_test.go:206
↓ 2 callers
Method
withLibvirt
withLibvirt opens a new RPC connection to Libvirt and invokes the input closure using the RPC connection. Connections are automatically cleaned up wh
hypervisor/rpc.go:83
↓ 1 callers
Method
BlockJobs
BlockJobs returns active block job operations.
qemu/domain.go:123
↓ 1 callers
Method
BlockStats
BlockStats returns block device statistics for a domain.
qemu/domain.go:143
↓ 1 callers
Method
CPUs
CPUs returns a domain's CPUs.
qemu/domain.go:209
↓ 1 callers
Method
Cancel
Cancel a running block job. For block-mirror operations, this cancels the block job.
qemu/block.go:180
↓ 1 callers
Method
Connect
Connect sets up a QEMU QMP connection by connecting directly to the QEMU monitor socket. An error is returned if the capabilities handshake does not
qmp/socket.go:122
↓ 1 callers
Function
ConsumeAtLeastOne
ConsumeAtLeastOne attempts to parse at least once with the given parser and then continues until it fails to parse.
qapi-schema/internal/parse/parse.go:114
↓ 1 callers
Method
Disconnect
Disconnect closes the QEMU monitor socket connection.
qmp/socket.go:103
↓ 1 callers
Method
DomainNames
DomainNames retrieves all hypervisor domain names using libvirt RPC.
hypervisor/rpc.go:34
↓ 1 callers
Method
Events
Events streams QEMU QMP Events until the provided context is cancelled. If a problem is encountered setting up the event monitor connection an error w
qmp/rpc.go:62
↓ 1 callers
Method
FieldName
()
internal/qmp-gen/types.go:235
↓ 1 callers
Method
InterfaceType
(api map[name]interface{})
internal/qmp-gen/types.go:265
↓ 1 callers
Function
Listen
Listen creates a new SocketMonitor listening for a single connection to the provided socket file or address. An error is returned if unable to listen
qmp/socket.go:83
↓ 1 callers
Method
MarshalJSON
MarshalJSON implements json.Marshaler.
qmp/raw/autogen.go:8970
↓ 1 callers
Function
MatchesToken
MatchesToken consumes the token from the input stream if matcher returns true.
qapi-schema/internal/parse/parse.go:55
↓ 1 callers
Function
NewMonitor
NewMonitor wraps a qmp.Monitor into a raw.Monitor.
qmp/raw/raw.go:25
↓ 1 callers
Method
NewMonitor
(domain string)
hypervisor/hypervisor.go:42
↓ 1 callers
Function
NewSocketMonitor
NewSocketMonitor configures a connection to the provided QEMU monitor socket. An error is returned if the socket cannot be successfully dialed, or the
qmp/socket.go:63
↓ 1 callers
Method
PackageVersion
PackageVersion returns the domain's QEMU package version, the full build information for QEMU.
qemu/domain.go:354
↓ 1 callers
Method
QueryCommands
query-commands -> QueryCommands (command) QueryCommands implements the "query-commands" QMP API call.
qmp/raw/autogen.go:12936
↓ 1 callers
Method
QueryStatus
query-status -> QueryStatus (command) QueryStatus implements the "query-status" QMP API call.
qmp/raw/autogen.go:13951
↓ 1 callers
Method
QueryVersion
query-version -> QueryVersion (command) QueryVersion implements the "query-version" QMP API call.
qmp/raw/autogen.go:14125
↓ 1 callers
Method
Run
Run executes the given QAPI command against a domain's QEMU instance. For a list of available QAPI commands, see: http://git.qemu.org/?p=qemu.git;a=b
qmp/rpc.go:88
↓ 1 callers
Method
RunWithFile
RunWithFile behaves like Run but allows for passing a file through out-of-band data.
qmp/socket.go:213
↓ 1 callers
Method
ScreenDump
ScreenDump captures the domain's screen and creates an output PPM image stream. ScreenDump will only work if the Domain resides on a local hypervisor
qemu/domain.go:246
↓ 1 callers
Method
Snapshot
Snapshot creates a point in time snapshot. The disk's image is given a new QCOW2 overlay, leaving the underlying image in a state that is considered s
qemu/block.go:214
↓ 1 callers
Method
String
()
qemu/string.gen.go:46
↓ 1 callers
Method
SystemReset
SystemReset sends a system reset event to the domain.
qemu/domain.go:328
next →
1–100 of 916, ranked by callers