Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadSubscription ¶
type ReadSubscription struct {
// contains filtered or unexported fields
}
ReadSubscription reads the messages coming in on the subscription and calls the given callback until the context of the subscription is cancelled.
func NewReadSubscription ¶
func NewReadSubscription(sub p2p.Subscription, callback ReadSubscriptionCallBackFunction, log zerolog.Logger) *ReadSubscription
NewReadSubscription reads the messages coming in on the subscription
func (*ReadSubscription) ReceiveLoop ¶
func (r *ReadSubscription) ReceiveLoop(ctx context.Context)
ReceiveLoop must be run in a goroutine. It continuously receives messages for the topic and calls the callback synchronously
Click to show internal directories.
Click to hide internal directories.