Documentation ¶
Index ¶
- type BoolEventCallback
- type BundleEventCallback
- type CallbackEventListener
- func (el *CallbackEventListener) Close() error
- func (el *CallbackEventListener) RegAccountShutdown(f SignalEventCallback)
- func (el *CallbackEventListener) RegAttachingToTangle(f SignalEventCallback)
- func (el *CallbackEventListener) RegConfirmedTransfers(f BundleEventCallback)
- func (el *CallbackEventListener) RegGettingTransactionsToApprove(f SignalEventCallback)
- func (el *CallbackEventListener) RegInputSelection(f BoolEventCallback)
- func (el *CallbackEventListener) RegInternalErrors(f ErrorCallback)
- func (el *CallbackEventListener) RegPreparingTransfer(f SignalEventCallback)
- func (el *CallbackEventListener) RegPromotions(f PromotionReattachmentEventCallback)
- func (el *CallbackEventListener) RegReattachments(f PromotionReattachmentEventCallback)
- func (el *CallbackEventListener) RegReceivedDeposits(f BundleEventCallback)
- func (el *CallbackEventListener) RegReceivedMessages(f BundleEventCallback)
- func (el *CallbackEventListener) RegReceivingDeposits(f BundleEventCallback)
- func (el *CallbackEventListener) RegSentTransfers(f BundleEventCallback)
- type ChannelEventListener
- func (el *ChannelEventListener) All() *ChannelEventListener
- func (el *ChannelEventListener) Close() error
- func (el *ChannelEventListener) RegAccountShutdown() *ChannelEventListener
- func (el *ChannelEventListener) RegAttachingToTangle() *ChannelEventListener
- func (el *ChannelEventListener) RegConfirmedTransfers() *ChannelEventListener
- func (el *ChannelEventListener) RegGettingTransactionsToApprove() *ChannelEventListener
- func (el *ChannelEventListener) RegInputSelection() *ChannelEventListener
- func (el *ChannelEventListener) RegInternalErrors() *ChannelEventListener
- func (el *ChannelEventListener) RegPreparingTransfer() *ChannelEventListener
- func (el *ChannelEventListener) RegPromotions() *ChannelEventListener
- func (el *ChannelEventListener) RegReattachments() *ChannelEventListener
- func (el *ChannelEventListener) RegReceivedDeposits() *ChannelEventListener
- func (el *ChannelEventListener) RegReceivedMessages() *ChannelEventListener
- func (el *ChannelEventListener) RegReceivingDeposits() *ChannelEventListener
- func (el *ChannelEventListener) RegSentTransfers() *ChannelEventListener
- type ErrorCallback
- type PromotionReattachmentEventCallback
- type SignalEventCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoolEventCallback ¶
type BoolEventCallback func(bool)
type BundleEventCallback ¶
type CallbackEventListener ¶
type CallbackEventListener struct {
// contains filtered or unexported fields
}
CallbackEventListener handles callbacks and registration for events against an EventMachine.
func NewCallbackEventListener ¶
func NewCallbackEventListener(em event.EventMachine) *CallbackEventListener
NewCallbackEventListener creates a new CallbackEventListener using the given EventMachine.
func (*CallbackEventListener) Close ¶
func (el *CallbackEventListener) Close() error
Close unregisters all callbacks from the EventMachine.
func (*CallbackEventListener) RegAccountShutdown ¶
func (el *CallbackEventListener) RegAccountShutdown(f SignalEventCallback)
RegAccountShutdown registers this listener to listen for shutdown messages. A shutdown signal is normally only signaled once by the account on it's graceful termination.
func (*CallbackEventListener) RegAttachingToTangle ¶
func (el *CallbackEventListener) RegAttachingToTangle(f SignalEventCallback)
RegAttachingToTangle registers this listener to listen to when Proof-of-Work is executed.
func (*CallbackEventListener) RegConfirmedTransfers ¶
func (el *CallbackEventListener) RegConfirmedTransfers(f BundleEventCallback)
RegConfirmedTransfers registers the given callback to execute when a transfer got confirmed.
func (*CallbackEventListener) RegGettingTransactionsToApprove ¶
func (el *CallbackEventListener) RegGettingTransactionsToApprove(f SignalEventCallback)
RegGettingTransactionsToApprove registers this listener to listen to when transactions to approve are getting fetched.
func (*CallbackEventListener) RegInputSelection ¶
func (el *CallbackEventListener) RegInputSelection(f BoolEventCallback)
RegInputSelection registers this listener to listen to when input selection is executed.
func (*CallbackEventListener) RegInternalErrors ¶
func (el *CallbackEventListener) RegInternalErrors(f ErrorCallback)
RegInternalErrors registers this listener to listen for internal account errors.
func (*CallbackEventListener) RegPreparingTransfer ¶
func (el *CallbackEventListener) RegPreparingTransfer(f SignalEventCallback)
RegPreparingTransfer registers this listener to listen to when a transfer is being prepared.
func (*CallbackEventListener) RegPromotions ¶
func (el *CallbackEventListener) RegPromotions(f PromotionReattachmentEventCallback)
RegPromotions registers the given callback to execute on promotions.
func (*CallbackEventListener) RegReattachments ¶
func (el *CallbackEventListener) RegReattachments(f PromotionReattachmentEventCallback)
RegReattachments registers the given callback to execute on reattachments.
func (*CallbackEventListener) RegReceivedDeposits ¶
func (el *CallbackEventListener) RegReceivedDeposits(f BundleEventCallback)
RegReceivedDeposits registers this listener to listen for received (confirmed) deposits.
func (*CallbackEventListener) RegReceivedMessages ¶
func (el *CallbackEventListener) RegReceivedMessages(f BundleEventCallback)
RegReceivedMessages registers this listener to listen for incoming messages.
func (*CallbackEventListener) RegReceivingDeposits ¶
func (el *CallbackEventListener) RegReceivingDeposits(f BundleEventCallback)
RegReceivingDeposits registers the given callback to execute when a new deposit is being received.
func (*CallbackEventListener) RegSentTransfers ¶
func (el *CallbackEventListener) RegSentTransfers(f BundleEventCallback)
RegSentTransfers registers the given callback to execute when a transfer is sent off.
type ChannelEventListener ¶
type ChannelEventListener struct { Promoted chan *promoter.PromotionReattachmentEvent Reattached chan *promoter.PromotionReattachmentEvent SentTransfer chan bundle.Bundle TransferConfirmed chan bundle.Bundle ReceivingDeposit chan bundle.Bundle ReceivedDeposit chan bundle.Bundle ReceivedMessage chan bundle.Bundle InternalError chan error ExecutingInputSelection chan bool PreparingTransfers chan struct{} GettingTransactionsToApprove chan struct{} AttachingToTangle chan struct{} Shutdown chan struct{} // contains filtered or unexported fields }
ChannelEventListener handles channels and registration for events against an EventMachine. Use the builder methods to register this listener against certain events. Once registered for events, you must listen for incoming events on the specific channel.
func NewChannelEventListener ¶
func NewChannelEventListener(em event.EventMachine) *ChannelEventListener
NewChannelEventListener creates a new ChannelEventListener using the given EventMachine.
func (*ChannelEventListener) All ¶
func (el *ChannelEventListener) All() *ChannelEventListener
All sets this listener up to listen to all account events.
func (*ChannelEventListener) Close ¶
func (el *ChannelEventListener) Close() error
Close frees up all underlying channels from the EventMachine.
func (*ChannelEventListener) RegAccountShutdown ¶
func (el *ChannelEventListener) RegAccountShutdown() *ChannelEventListener
RegAccountShutdown registers this listener to listen for shutdown messages. A shutdown signal is normally only signaled once by the account on it's graceful termination.
func (*ChannelEventListener) RegAttachingToTangle ¶
func (el *ChannelEventListener) RegAttachingToTangle() *ChannelEventListener
RegAttachingToTangle registers this listener to listen to when Proof-of-Work is executed.
func (*ChannelEventListener) RegConfirmedTransfers ¶
func (el *ChannelEventListener) RegConfirmedTransfers() *ChannelEventListener
RegConfirmedTransfers registers this listener to listen for sent off confirmed transfers.
func (*ChannelEventListener) RegGettingTransactionsToApprove ¶
func (el *ChannelEventListener) RegGettingTransactionsToApprove() *ChannelEventListener
RegGettingTransactionsToApprove registers this listener to listen to when transactions to approve are getting fetched.
func (*ChannelEventListener) RegInputSelection ¶
func (el *ChannelEventListener) RegInputSelection() *ChannelEventListener
RegInputSelection registers this listener to listen to when input selection is executed.
func (*ChannelEventListener) RegInternalErrors ¶
func (el *ChannelEventListener) RegInternalErrors() *ChannelEventListener
RegInternalErrors registers this listener to listen for internal account errors.
func (*ChannelEventListener) RegPreparingTransfer ¶
func (el *ChannelEventListener) RegPreparingTransfer() *ChannelEventListener
RegPreparingTransfer registers this listener to listen to when a transfer is being prepared.
func (*ChannelEventListener) RegPromotions ¶
func (el *ChannelEventListener) RegPromotions() *ChannelEventListener
RegPromotions registers this listener to listen for promotions.
func (*ChannelEventListener) RegReattachments ¶
func (el *ChannelEventListener) RegReattachments() *ChannelEventListener
RegReattachments registers this listener to listen for reattachments.
func (*ChannelEventListener) RegReceivedDeposits ¶
func (el *ChannelEventListener) RegReceivedDeposits() *ChannelEventListener
RegReceivedDeposits registers this listener to listen for received (confirmed) deposits.
func (*ChannelEventListener) RegReceivedMessages ¶
func (el *ChannelEventListener) RegReceivedMessages() *ChannelEventListener
RegReceivedMessages registers this listener to listen for incoming messages.
func (*ChannelEventListener) RegReceivingDeposits ¶
func (el *ChannelEventListener) RegReceivingDeposits() *ChannelEventListener
RegReceivingDeposits registers this listener to listen for incoming deposits which are not yet confirmed.
func (*ChannelEventListener) RegSentTransfers ¶
func (el *ChannelEventListener) RegSentTransfers() *ChannelEventListener
RegSentTransfers registers this listener to listen for sent off transfers.
type ErrorCallback ¶
type ErrorCallback func(error)
type PromotionReattachmentEventCallback ¶
type PromotionReattachmentEventCallback func(*promoter.PromotionReattachmentEvent)
type SignalEventCallback ¶
type SignalEventCallback func()