2022-02-17 12:42:07 +00:00
|
|
|
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 {
|
2022-02-17 12:43:09 +00:00
|
|
|
// Notify must notify about an event generated
|
|
|
|
// from an object with a specific topic.
|
2022-02-17 12:42:07 +00:00
|
|
|
Notify(topic string, address *objectSDKAddress.Address)
|
|
|
|
}
|