dealwatcher

package
v2.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 12 Imported by: 0

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 New

New returns a new DealWatcher.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL