Add uint types to GangliaSink and LibgangliaSink

This commit is contained in:
Thomas Roehl
2022-02-22 15:51:08 +01:00
parent 66275ecf74
commit 9cfbe10247
2 changed files with 23 additions and 0 deletions

View File

@@ -212,6 +212,15 @@ func (s *LibgangliaSink) Write(point lp.CCMetric) error {
case int:
c_value = C.CString(fmt.Sprintf("%d", real))
c_type = lookup("int32")
case uint64:
c_value = C.CString(fmt.Sprintf("%d", real))
c_type = lookup("uint32")
case uint32:
c_value = C.CString(fmt.Sprintf("%d", real))
c_type = lookup("uint32")
case uint:
c_value = C.CString(fmt.Sprintf("%d", real))
c_type = lookup("uint32")
case string:
c_value = C.CString(real)
c_type = lookup("string")