[#1243] node/cfg: Add notification config
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
16543a1904
commit
5dba64fcc5
3 changed files with 19 additions and 5 deletions
|
@ -131,6 +131,15 @@ func initNotifications(c *cfg) {
|
|||
panic("could not created object notificator: " + err.Error())
|
||||
}
|
||||
|
||||
c.cfgNotifications = cfgNotifications{
|
||||
enabled: true,
|
||||
nw: notificationWriter{
|
||||
l: c.log,
|
||||
w: natsSvc,
|
||||
},
|
||||
defaultTopic: topic,
|
||||
}
|
||||
|
||||
n := notificator.New(new(notificator.Prm).
|
||||
SetLogger(c.log).
|
||||
SetNotificationSource(
|
||||
|
@ -139,10 +148,7 @@ func initNotifications(c *cfg) {
|
|||
l: c.log,
|
||||
defaultTopic: topic,
|
||||
}).
|
||||
SetWriter(notificationWriter{
|
||||
l: c.log,
|
||||
w: natsSvc,
|
||||
}),
|
||||
SetWriter(c.cfgNotifications.nw),
|
||||
)
|
||||
|
||||
addNewEpochAsyncNotificationHandler(c, func(e event.Event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue