Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadyDispatcher ¶
func ReadyDispatcher(evt pubsub.Event, fn pubsub.SubscriberFn) error
ReadyDispatcher is just an pubsub dispatcher where the callback is ReadyFunc
Types ¶
type ReadyFunc ¶
type ReadyFunc func(error)
ReadyFunc is function that gets called once when an event is ready
type ReadyManager ¶
type ReadyManager struct { Stop context.CancelFunc // contains filtered or unexported fields }
ReadyManager managers listeners for a ready event
func NewReadyManager ¶
func NewReadyManager() *ReadyManager
func (*ReadyManager) AwaitReady ¶
func (m *ReadyManager) AwaitReady() error
AwaitReady blocks until the ready event fires. Returns immediately if the event already fired.
func (*ReadyManager) FireReady ¶
func (m *ReadyManager) FireReady(err error) error
FireReady is called when the ready event occurs
func (*ReadyManager) OnReady ¶
func (m *ReadyManager) OnReady(ready ReadyFunc)
OnReady registers a listener for the ready event. If the event has already been fired, the callback is immediately called back (in a go-routine).
type RetryStream ¶
type RetryStream struct {
// contains filtered or unexported fields
}
func NewRetryStream ¶
func NewRetryStream(opener StreamOpener, options ...RetryStreamOption) *RetryStream
func (*RetryStream) OpenStream ¶
func (*RetryStream) SetOptions ¶
func (impl *RetryStream) SetOptions(options ...RetryStreamOption)
type RetryStreamOption ¶
type RetryStreamOption func(*RetryStream)
func RetryParameters ¶
func RetryParameters(minDuration time.Duration, maxDuration time.Duration, attempts float64, backoffFactor float64) RetryStreamOption
RetryParameters changes the default parameters around connection reopening
type StreamOpener ¶
type TipSetToken ¶
type TipSetToken []byte
TipSetToken is the implementation-nonspecific identity for a tipset.
type Unsubscribe ¶
type Unsubscribe func()
Unsubscribe is a function that gets called to unsubscribe from (storage|retrieval)market events