mempool

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mempool

type Mempool struct {
	plugin.Base
	// contains filtered or unexported fields
}

func New

func New(opts ...MempoolOptionFunc) *Mempool

New returns a new Mempool input plugin

func (*Mempool) Role added in v0.46.0

func (m *Mempool) Role() plugin.PluginType

Role identifies this plugin as a pipeline input.

func (*Mempool) Start

func (m *Mempool) Start() error

Start connects to the node and starts polling. It is idempotent while running; restart with Stop followed by Start.

func (*Mempool) StartContext added in v0.46.0

func (m *Mempool) StartContext(ctx context.Context) error

StartContext starts the plugin with ctx governing setup and run operations. Call Stop to wait for workers and release resources, including after cancellation.

func (*Mempool) Stop

func (m *Mempool) Stop() error

Stop cancels startup or polling and releases the node connection.

type MempoolOptionFunc

type MempoolOptionFunc func(*Mempool)

func WithAddress

func WithAddress(address string) MempoolOptionFunc

WithAddress specifies the TCP address (host:port). Use WithNtcTcp(true) for NtC over TCP.

func WithIncludeCbor

func WithIncludeCbor(includeCbor bool) MempoolOptionFunc

WithIncludeCbor specifies whether to include transaction CBOR in events

func WithKupoUrl

func WithKupoUrl(kupoUrl string) MempoolOptionFunc

WithKupoUrl specifies the Kupo API URL for resolving transaction inputs (e.g. http://localhost:1442).

func WithLogger

func WithLogger(logger plugin.Logger) MempoolOptionFunc

WithLogger specifies the logger to use

func WithNetwork

func WithNetwork(network string) MempoolOptionFunc

WithNetwork specifies the network name (e.g. mainnet, preprod)

func WithNetworkMagic

func WithNetworkMagic(networkMagic uint32) MempoolOptionFunc

WithNetworkMagic specifies the network magic value (overrides network name)

func WithNtcTcp

func WithNtcTcp(ntcTcp bool) MempoolOptionFunc

WithNtcTcp specifies whether to use NtC over TCP (e.g. when exposing socket via socat)

func WithPollInterval

func WithPollInterval(duration string) MempoolOptionFunc

WithPollInterval specifies how often to poll the mempool (e.g. "5s", "1m"). Default 5s.

func WithSocketPath

func WithSocketPath(socketPath string) MempoolOptionFunc

WithSocketPath specifies the path to the node's UNIX socket (NtC)

Jump to

Keyboard shortcuts

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