Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface {
// Shutdown gracefully stops the event monitoring service and cleans up resources.
// Once called, the service will unsubscribe from events and complete any pending operations.
Shutdown()
}
Service represents an event monitoring service that subscribes to and processes blockchain events. It monitors block headers and various transaction events, publishing them to a message bus.
func NewEvents ¶
func NewEvents(pctx context.Context, node sdkclient.CometRPC, name string, bus pubsub.Bus) (Service, error)
NewEvents creates and initializes a new blockchain event monitoring service.
Parameters:
- pctx: Parent context for controlling the service lifecycle
- client: Tendermint RPC client for interacting with the blockchain
- name: Service name used as a prefix for subscription identifiers
- bus: Message bus for publishing processed events
Returns:
- Service: A running event monitoring service interface
- error: Any error encountered during service initialization
Click to show internal directories.
Click to hide internal directories.