events

package
v0.38.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service added in v0.38.2

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 added in v0.38.2

func NewEvents(pctx context.Context, client tmclient.Client, 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

The service subscribes to block header events and processes them to extract and publish various transaction events (deployment, market, provider, audit) to the provided message bus. The service starts monitoring events immediately and will continue until either the context is canceled or Shutdown() is called.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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