mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
Rename IcingaEventsBroker to IcingaHeartbeatListener
This commit is contained in:
parent
3968f6b3c8
commit
a3b7ac5af6
3 changed files with 5 additions and 5 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
}()
|
||||
|
||||
|
|
|
|||
2
main.go
2
main.go
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue