Add build tag 'ganglia' and create corresponding files

This commit is contained in:
Thomas Roehl 2022-02-16 18:27:49 +01:00
parent 7d0b1c268f
commit 7675238899
4 changed files with 64 additions and 0 deletions

View File

@ -1,3 +1,5 @@
//go:build ganglia
package sinks
import (

View File

@ -0,0 +1,31 @@
//go:build !ganglia
package sinks
import (
"encoding/json"
"errors"
// "time"
lp "github.com/ClusterCockpit/cc-metric-collector/internal/ccMetric"
)
type GangliaSink struct {
sink
}
func (s *GangliaSink) Init(config json.RawMessage) error {
return errors.New("sink 'ganglia' not implemented, rebuild with tag 'ganglia'")
}
func (s *GangliaSink) Write(point lp.CCMetric) error {
return errors.New("sink 'ganglia' not implemented, rebuild with tag 'ganglia'")
}
func (s *GangliaSink) Flush() error {
return errors.New("sink 'ganglia' not implemented, rebuild with tag 'ganglia'")
}
func (s *GangliaSink) Close() {
}

View File

@ -1,3 +1,5 @@
//go:build ganglia
package sinks
/*

View File

@ -0,0 +1,29 @@
//go:build !ganglia
package sinks
import (
"encoding/json"
"errors"
lp "github.com/ClusterCockpit/cc-metric-collector/internal/ccMetric"
)
type LibgangliaSink struct {
sink
}
func (s *LibgangliaSink) Init(config json.RawMessage) error {
return errors.New("sink 'libganglia' not implemented, rebuild with tag 'ganglia'")
}
func (s *LibgangliaSink) Write(point lp.CCMetric) error {
return errors.New("sink 'libganglia' not implemented, rebuild with tag 'ganglia'")
}
func (s *LibgangliaSink) Flush() error {
return errors.New("sink 'ganglia' not implemented, rebuild with tag 'ganglia'")
}
func (s *LibgangliaSink) Close() {
}