mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-25 15:09:05 +01:00
Add uint types to GangliaSink and LibgangliaSink
This commit is contained in:
parent
66275ecf74
commit
9cfbe10247
@ -134,9 +134,21 @@ func (s *GangliaSink) Write(point lp.CCMetric) error {
|
|||||||
case int:
|
case int:
|
||||||
argstr = append(argstr,
|
argstr = append(argstr,
|
||||||
fmt.Sprintf("--value=%d", value), "--type=int32")
|
fmt.Sprintf("--value=%d", value), "--type=int32")
|
||||||
|
case int32:
|
||||||
|
argstr = append(argstr,
|
||||||
|
fmt.Sprintf("--value=%d", value), "--type=int32")
|
||||||
case int64:
|
case int64:
|
||||||
argstr = append(argstr,
|
argstr = append(argstr,
|
||||||
fmt.Sprintf("--value=%d", value), "--type=int32")
|
fmt.Sprintf("--value=%d", value), "--type=int32")
|
||||||
|
case uint:
|
||||||
|
argstr = append(argstr,
|
||||||
|
fmt.Sprintf("--value=%d", value), "--type=uint32")
|
||||||
|
case uint32:
|
||||||
|
argstr = append(argstr,
|
||||||
|
fmt.Sprintf("--value=%d", value), "--type=uint32")
|
||||||
|
case uint64:
|
||||||
|
argstr = append(argstr,
|
||||||
|
fmt.Sprintf("--value=%d", value), "--type=uint32")
|
||||||
case string:
|
case string:
|
||||||
argstr = append(argstr,
|
argstr = append(argstr,
|
||||||
fmt.Sprintf("--value=%q", value), "--type=string")
|
fmt.Sprintf("--value=%q", value), "--type=string")
|
||||||
@ -155,3 +167,5 @@ func (s *GangliaSink) Flush() error {
|
|||||||
|
|
||||||
func (s *GangliaSink) Close() {
|
func (s *GangliaSink) Close() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewGangliaSink()
|
||||||
|
@ -212,6 +212,15 @@ func (s *LibgangliaSink) Write(point lp.CCMetric) error {
|
|||||||
case int:
|
case int:
|
||||||
c_value = C.CString(fmt.Sprintf("%d", real))
|
c_value = C.CString(fmt.Sprintf("%d", real))
|
||||||
c_type = lookup("int32")
|
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:
|
case string:
|
||||||
c_value = C.CString(real)
|
c_value = C.CString(real)
|
||||||
c_type = lookup("string")
|
c_type = lookup("string")
|
||||||
|
Loading…
Reference in New Issue
Block a user