frostfs-node/pkg/services/notificator/deps.go
Pavel Karpy 03b601b594 [#1183] node: Init notificator on startup
It uses logger as a notification writer. NATS messaging will be implemented
later.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-03-05 11:41:18 +03:00

18 lines
658 B
Go

package notificator
import objectSDKAddress "github.com/nspcc-dev/neofs-sdk-go/object/address"
// NotificationSource is a source of object notifications.
type NotificationSource interface {
// Iterate must iterate over all notifications for the
// provided epoch and call handler for all of them.
Iterate(epoch uint64, handler func(topic string, addr *objectSDKAddress.Address))
}
// NotificationWriter notifies all the subscribers
// about new object notifications.
type NotificationWriter interface {
// Notify must notify about an event generated
// from an object with a specific topic.
Notify(topic string, address *objectSDKAddress.Address)
}