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

Method NodeGetMemoryStats

remote_protocol.gen.go:11194–11231  ·  view source on GitHub ↗

NodeGetMemoryStats is the go wrapper for REMOTE_PROC_NODE_GET_MEMORY_STATS.

(Nparams int32, CellNum int32, Flags uint32)

Source from the content-addressed store, hash-verified

11192
11193// NodeGetMemoryStats is the go wrapper for REMOTE_PROC_NODE_GET_MEMORY_STATS.
11194func (l *Libvirt) NodeGetMemoryStats(Nparams int32, CellNum int32, Flags uint32) (rParams []NodeGetMemoryStats, rNparams int32, err error) {
11195 var buf []byte
11196
11197 args := NodeGetMemoryStatsArgs {
11198 Nparams: Nparams,
11199 CellNum: CellNum,
11200 Flags: Flags,
11201 }
11202
11203 buf, err = encode(&args)
11204 if err != nil {
11205 return
11206 }
11207
11208 var r response
11209 r, err = l.requestStream(228, constants.Program, buf, nil, nil)
11210 if err != nil {
11211 return
11212 }
11213
11214 // Return value unmarshaling
11215 tpd := typedParamDecoder{}
11216 ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
11217 rdr := bytes.NewReader(r.Payload)
11218 dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
11219 // Params: []NodeGetMemoryStats
11220 _, err = dec.Decode(&rParams)
11221 if err != nil {
11222 return
11223 }
11224 // Nparams: int32
11225 _, err = dec.Decode(&rNparams)
11226 if err != nil {
11227 return
11228 }
11229
11230 return
11231}
11232
11233// DomainGetControlInfo is the go wrapper for REMOTE_PROC_DOMAIN_GET_CONTROL_INFO.
11234func (l *Libvirt) DomainGetControlInfo(Dom Domain, Flags uint32) (rState uint32, rDetails uint32, rStateTime uint64, err error) {

Callers

nothing calls this directly

Calls 3

requestStreamMethod · 0.95
encodeFunction · 0.85
DecodeMethod · 0.65

Tested by

no test coverage detected