mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-24 14:49: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:
|
||||
argstr = append(argstr,
|
||||
fmt.Sprintf("--value=%d", value), "--type=int32")
|
||||
case int32:
|
||||
argstr = append(argstr,
|
||||
fmt.Sprintf("--value=%d", value), "--type=int32")
|
||||
case int64:
|
||||
argstr = append(argstr,
|
||||
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:
|
||||
argstr = append(argstr,
|
||||
fmt.Sprintf("--value=%q", value), "--type=string")
|
||||
@ -155,3 +167,5 @@ func (s *GangliaSink) Flush() error {
|
||||
|
||||
func (s *GangliaSink) Close() {
|
||||
}
|
||||
|
||||
func NewGangliaSink()
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user