Documentation ¶
Overview ¶
Copyright (c) 2023-2024 Nibi, Inc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBus ¶
type EventBus interface { // AddTopic: Adds a new topic with the specified name and message source AddTopic(name string, src <-chan coretypes.ResultEvent) error // RemoveTopic: Removes the specified topic and all its related data, // ensuring clean up of resources. RemoveTopic(name string) Subscribe(name string) (<-chan coretypes.ResultEvent, UnsubscribeFunc, error) Topics() []string }
EventBus manages topics and subscriptions. A "topic" is a named channel of communication. A "subscription" is the action taken by a subscriber to express interest in receiving messages broadcasted from a specific topic.
func NewEventBus ¶
func NewEventBus() EventBus
NewEventBus returns a fresh imlpemention of `memEventBus`, which implements the `EventBus` interface for managing Ethereum topics and subscriptions.
type UnsubscribeFunc ¶
type UnsubscribeFunc func()
Click to show internal directories.
Click to hide internal directories.