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

Method NodeDeviceNumOfCaps

remote_protocol.gen.go:7898–7928  ·  view source on GitHub ↗

NodeDeviceNumOfCaps is the go wrapper for REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS.

(Name string)

Source from the content-addressed store, hash-verified

7896
7897// NodeDeviceNumOfCaps is the go wrapper for REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS.
7898func (l *Libvirt) NodeDeviceNumOfCaps(Name string) (rNum int32, err error) {
7899 var buf []byte
7900
7901 args := NodeDeviceNumOfCapsArgs {
7902 Name: Name,
7903 }
7904
7905 buf, err = encode(&args)
7906 if err != nil {
7907 return
7908 }
7909
7910 var r response
7911 r, err = l.requestStream(116, constants.Program, buf, nil, nil)
7912 if err != nil {
7913 return
7914 }
7915
7916 // Return value unmarshaling
7917 tpd := typedParamDecoder{}
7918 ct := map[string]xdr.TypeDecoder{"libvirt.TypedParam": tpd}
7919 rdr := bytes.NewReader(r.Payload)
7920 dec := xdr.NewDecoderCustomTypes(rdr, 0, ct)
7921 // Num: int32
7922 _, err = dec.Decode(&rNum)
7923 if err != nil {
7924 return
7925 }
7926
7927 return
7928}
7929
7930// NodeDeviceListCaps is the go wrapper for REMOTE_PROC_NODE_DEVICE_LIST_CAPS.
7931func (l *Libvirt) NodeDeviceListCaps(Name string, Maxnames int32) (rNames []string, err error) {

Callers

nothing calls this directly

Calls 3

requestStreamMethod · 0.95
encodeFunction · 0.85
DecodeMethod · 0.65

Tested by

no test coverage detected