Documentation ¶
Index ¶
- Constants
- type ChannelNotifier
- func (cn *ChannelNotifier) Close() error
- func (cn *ChannelNotifier) NotifyLedgerUpdated(info query.LedgerChannelInfo) error
- func (cn *ChannelNotifier) NotifyPaymentUpdated(info query.PaymentChannelInfo) error
- func (cn *ChannelNotifier) RegisterForAllLedgerUpdates() <-chan query.LedgerChannelInfo
- func (cn *ChannelNotifier) RegisterForAllPaymentUpdates() <-chan query.PaymentChannelInfo
- func (cn *ChannelNotifier) RegisterForLedgerUpdates(cId types.Destination) <-chan query.LedgerChannelInfo
- func (cn *ChannelNotifier) RegisterForPaymentChannelUpdates(cId types.Destination) <-chan query.PaymentChannelInfo
Constants ¶
const ALL_NOTIFICATIONS = "all"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelNotifier ¶
type ChannelNotifier struct {
// contains filtered or unexported fields
}
ChannelNotifier is used to notify multiple listeners of a channel update.
func NewChannelNotifier ¶
func NewChannelNotifier(store store.Store, vm *payments.VoucherManager) *ChannelNotifier
NewChannelNotifier constructs a channel notifier using the provided store.
func (*ChannelNotifier) Close ¶
func (cn *ChannelNotifier) Close() error
Close closes the notifier and all listeners.
func (*ChannelNotifier) NotifyLedgerUpdated ¶
func (cn *ChannelNotifier) NotifyLedgerUpdated(info query.LedgerChannelInfo) error
NotifyLedgerUpdated notifies all listeners of a ledger channel update. It should be called whenever a ledger channel is updated.
func (*ChannelNotifier) NotifyPaymentUpdated ¶
func (cn *ChannelNotifier) NotifyPaymentUpdated(info query.PaymentChannelInfo) error
NotifyPaymentUpdated notifies all listeners of a payment channel update. It should be called whenever a payment channel is updated.
func (*ChannelNotifier) RegisterForAllLedgerUpdates ¶
func (cn *ChannelNotifier) RegisterForAllLedgerUpdates() <-chan query.LedgerChannelInfo
RegisterForAllLedgerUpdates returns a buffered channel that will receive updates for all ledger channels.
func (*ChannelNotifier) RegisterForAllPaymentUpdates ¶
func (cn *ChannelNotifier) RegisterForAllPaymentUpdates() <-chan query.PaymentChannelInfo
RegisterForAllPaymentUpdates returns a buffered channel that will receive updates for all payment channels.
func (*ChannelNotifier) RegisterForLedgerUpdates ¶
func (cn *ChannelNotifier) RegisterForLedgerUpdates(cId types.Destination) <-chan query.LedgerChannelInfo
RegisterForLedgerUpdates returns a buffered channel that will receive updates for a specific ledger channel.
func (*ChannelNotifier) RegisterForPaymentChannelUpdates ¶
func (cn *ChannelNotifier) RegisterForPaymentChannelUpdates(cId types.Destination) <-chan query.PaymentChannelInfo
RegisterForLedgerUpdates returns a buffered channel that will receive updates or a specific payment channel.