Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NotifierPollInterval = time.Second * 30
Functions ¶
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func NewNotifierWithStorage ¶
func NewRemoteSyncNotifier ¶
NewRemoteSyncNotifier creates an IPNI sync notifier instance that calls notification functions when a remote IPNI instance has performed a sync and it's latest advertisement has changed. The head parameter is optional.
Note: not guaranteed to notify for every sync event.
func (*Notifier) Notify ¶
func (n *Notifier) Notify(f NotifyRemoteSyncFunc)
type NotifierHead ¶
type NotifyRemoteSyncFunc ¶
NotifyRemoteSyncFunc is a function that is called when a remote IPNI node has been seen to perform a sync.
type RemoteSyncNotifier ¶
type RemoteSyncNotifier interface { // Notify adds the passed notification function to the list of functions that // should be called when a remote IPNI node has been seen to perform a sync. Notify(NotifyRemoteSyncFunc) }
RemoteSyncNotifier enables notifications of remote sync events.
Click to show internal directories.
Click to hide internal directories.