Rename IcingaEventsBroker to IcingaHeartbeatListener

This commit is contained in:
Noah Hilverling 2019-09-17 13:47:03 +02:00
parent 3968f6b3c8
commit a3b7ac5af6
3 changed files with 5 additions and 5 deletions

View file

@ -21,8 +21,8 @@ func Sha1bytes(bytes []byte) []byte {
return hash.Sum(nil)
}
func IcingaEventsBroker(rdb *connection.RDBWrapper, chEnv chan *Environment) error {
log.Info("Starting Events broker")
func IcingaHeartbeatListener(rdb *connection.RDBWrapper, chEnv chan *Environment) error {
log.Info("Starting heartbeat listener")
subscription := rdb.Subscribe()
defer subscription.Close()

View file

@ -15,7 +15,7 @@ var icingastate = "{\"IcingaApplication\":" +
"\"environment\": \"\"" +
"}}}}, \"config_dump_in_progress\": false}"
func TestIcingaEventsBroker(t *testing.T) {
func TestIcingaHeartbeatListener(t *testing.T) {
rdb, err := connection.NewRDBWrapper("10.77.27.16:6379")
if err != nil {
t.Fatal("This test needs a working Redis connection")
@ -24,7 +24,7 @@ func TestIcingaEventsBroker(t *testing.T) {
chEnv := make(chan *Environment)
go func() {
err := IcingaEventsBroker(rdb, chEnv)
err := IcingaHeartbeatListener(rdb, chEnv)
assert.NoError(t, err, "redis connection error")
}()

View file

@ -101,7 +101,7 @@ func main() {
go haInstance.Run(chEnv)
go func() {
super.ChErr <- ha.IcingaEventsBroker(redisConn, chEnv)
super.ChErr <- ha.IcingaHeartbeatListener(redisConn, chEnv)
}()
go jsondecoder.DecodePool(super.ChDecode, super.ChErr, 16)