Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is returned when a subscription isn't found. ErrNotFound = errors.New("subscription not found") // ErrActiveSubscription is returned when an already registered channel is registered again. ErrActiveSubscription = errors.New("active subscription") )
Functions ¶
This section is empty.
Types ¶
type DealWatcher ¶
type DealWatcher struct {
// contains filtered or unexported fields
}
DealWatcher provides a centralize way to watch for deal updates.
func (*DealWatcher) Close ¶
func (dw *DealWatcher) Close() error
Close gracefully shutdowns the deal watcher.
func (*DealWatcher) Subscribe ¶
func (dw *DealWatcher) Subscribe(ch chan<- struct{}, proposalCid cid.Cid) error
Subscribe registers a channel that will receive updates for a proposalCid.
func (*DealWatcher) Unsubscribe ¶
func (dw *DealWatcher) Unsubscribe(ch chan<- struct{}, proposalCid cid.Cid) error
Unsubscribe removes a previously registered channel to stop receiving updates.
Click to show internal directories.
Click to hide internal directories.