MCPcopy Create free account
hub / github.com/digitalocean/go-libvirt / NodeGetFreeMemory

Method NodeGetFreeMemory

remote_protocol.gen.go:7468–7489  ·  view source on GitHub ↗

NodeGetFreeMemory is the go wrapper for REMOTE_PROC_NODE_GET_FREE_MEMORY.

()

Source from the content-addressed store, hash-verified

7466
7467// NodeGetFreeMemory is the go wrapper for REMOTE_PROC_NODE_GET_FREE_MEMORY.
7468func (l *Libvirt) NodeGetFreeMemory() (rFreeMem uint64, err error) {
7469 var buf []byte
7470
7471 var r response
7472 r, err = l.requestStream(102, constants.Program, buf, nil, nil)
7473 if err != nil {
7474 return
7475 }
7476
7477 // Return value unmarshaling
7478 tpd := typedParamDecoder{}
7479 ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
7480 rdr := bytes.NewReader(r.Payload)
7481 dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
7482 // FreeMem: uint64
7483 _, err = dec.Decode(&rFreeMem)
7484 if err != nil {
7485 return
7486 }
7487
7488 return
7489}
7490
7491// DomainBlockPeek is the go wrapper for REMOTE_PROC_DOMAIN_BLOCK_PEEK.
7492func (l *Libvirt) DomainBlockPeek(Dom Domain, Path string, Offset uint64, Size uint32, Flags uint32) (rBuffer []byte, err error) {

Callers

nothing calls this directly

Calls 2

requestStreamMethod · 0.95
DecodeMethod · 0.65

Tested by

no test coverage detected