Documentation ¶
Index ¶
- Constants
- func Close()
- func Connect() error
- func GetClient() (mqtt.Client, error)
- func PublishBlockAddedNotifications(hash string) error
- func PublishSelectedParentChainNotifications(removedChainHashes []string, addedChainBlocks []*appmessage.ChainBlock) error
- func PublishSelectedTipNotification(selectedTipHash string) error
- func PublishUnacceptedTransactionsNotifications(unacceptedTransactions []*dbmodels.Transaction) error
Constants ¶
View Source
const ( // TransactionsTopic is an MQTT topic for transactions TransactionsTopic = "transactions" // AcceptedTransactionsTopic is an MQTT topic for accepted transactions AcceptedTransactionsTopic = "transactions/accepted" // UnacceptedTransactionsTopic is an MQTT topic for unaccepted transactions UnacceptedTransactionsTopic = "transactions/unaccepted" )
View Source
const BlocksTopic = "dag/blocks"
BlocksTopic is an MQTT topic for new blocks
View Source
const SelectedParentChainTopic = "dag/selected-parent-chain"
SelectedParentChainTopic is an MQTT topic for changes in the selected parent chain
View Source
const (
// SelectedTipTopic is an MQTT topic for DAG selected tips
SelectedTipTopic = "dag/selected-tip"
)
Variables ¶
This section is empty.
Functions ¶
func GetClient ¶
GetClient returns an instance of the MQTT client, in case we have an active connection
func PublishBlockAddedNotifications ¶
PublishBlockAddedNotifications publishes notifications for the block that was added, and notifications for its transactions.
func PublishSelectedParentChainNotifications ¶
func PublishSelectedParentChainNotifications(removedChainHashes []string, addedChainBlocks []*appmessage.ChainBlock) error
PublishSelectedParentChainNotifications publishes notifications for changes in the selected parent chain
func PublishSelectedTipNotification ¶
PublishSelectedTipNotification publishes notification for a new selected tip
func PublishUnacceptedTransactionsNotifications ¶
func PublishUnacceptedTransactionsNotifications(unacceptedTransactions []*dbmodels.Transaction) error
PublishUnacceptedTransactionsNotifications publishes notification for each unaccepted transaction of the given chain-block
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.