forked from TrueCloudLab/frostfs-node
Alex Vanin
20de74a505
Due to source code relocation from GitHub. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
20 lines
628 B
Go
20 lines
628 B
Go
package notificator
|
|
|
|
import (
|
|
oid "git.frostfs.info/TrueCloudLab/frostfs-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)
|
|
}
|