forked from TrueCloudLab/frostfs-node
1c30414a6c
Core changes: * avoid package-colliding variable naming * avoid using pointers to IDs where unnecessary * avoid using `idSDK` import alias pattern * use `EncodeToString` for protocol string calculation and `String` for printing Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
20 lines
617 B
Go
20 lines
617 B
Go
package notificator
|
|
|
|
import (
|
|
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
|
)
|
|
|
|
// 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 oid.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 oid.Address)
|
|
}
|