Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notice ¶
type Notice struct {
// SeqNum is a strictly increasing number between notice
SeqNum uint64
SubscriptionID string
Event skydb.RecordHookEvent
Record *skydb.Record
}
Notice encapsulates the information sent to subscribers when the content of a subscription has changed.
type Notifier ¶
type Notifier interface {
// CanNotify returns whether the Notifier can send notice to the device.
CanNotify(device skydb.Device) bool
// Notify sends an notice to the device.
Notify(device skydb.Device, notice Notice) error
}
Notifier is the interface implemented by an object that knows how to deliver a Notice to a device.
func NewHubNotifier ¶
NewHubNotifier returns an Notifier which sends Notice thru the supplied hub. The notice will be sent via the channel name "_sub_[DEVICE_ID]".
func NewMultiNotifier ¶
NewMultiNotifier returns a Notifier which sends Notice to multiple underlying Notifiers
func NewPushNotifier ¶
NewPushNotifier returns an Notifier which sends Notice using the given push.Sender.
Click to show internal directories.
Click to hide internal directories.