events

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: Apache-2.0 Imports: 16 Imported by: 2

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL