Documentation
¶
Index ¶
- func NewFromCmdlineOptions() plugin.Plugin
- type Mempool
- type MempoolOptionFunc
- func WithAddress(address string) MempoolOptionFunc
- func WithIncludeCbor(includeCbor bool) MempoolOptionFunc
- func WithKupoUrl(kupoUrl string) MempoolOptionFunc
- func WithLogger(logger plugin.Logger) MempoolOptionFunc
- func WithNetwork(network string) MempoolOptionFunc
- func WithNetworkMagic(networkMagic uint32) MempoolOptionFunc
- func WithNtcTcp(ntcTcp bool) MempoolOptionFunc
- func WithPollInterval(duration string) MempoolOptionFunc
- func WithSocketPath(socketPath string) MempoolOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFromCmdlineOptions ¶
Types ¶
type Mempool ¶
type Mempool struct {
// contains filtered or unexported fields
}
func (*Mempool) OutputChan ¶
OutputChan returns the channel of mempool transaction events
func (*Mempool) Start ¶
Start connects to the node and starts polling the mempool. Safe to call again to restart (e.g. when the pipeline is restarted via Stop() then Start()). Event and error channels are reused when non-nil so that the pipeline's goroutines reading from OutputChan()/ErrorChan() never see a closed channel; after Stop() they are nil so the next Start() creates new channels and the pipeline obtains fresh references.
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)