Documentation
¶
Overview ¶
Package source provides transaction source implementations for the bridge.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNodeRecordsRequired is returned when nodeRecords is empty for p2p mode ErrNodeRecordsRequired = errors.New("nodeRecords is required for p2p mode") // ErrRPCEndpointsRequired is returned when rpcEndpoints is empty for rpc mode ErrRPCEndpointsRequired = errors.New("rpcEndpoints is required for rpc mode") // ErrInvalidPollingInterval is returned when pollingInterval is too short ErrInvalidPollingInterval = errors.New("pollingInterval must be at least 1 second for HTTP endpoints") // ErrUnsupportedProtocol is returned when an RPC endpoint uses an unsupported protocol ErrUnsupportedProtocol = errors.New("rpc endpoint must use a supported protocol (ws://, wss://, http://, https://)") // ErrUnknownMode is returned when an unknown mode is specified ErrUnknownMode = errors.New("unknown mode") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
RetryInterval time.Duration `yaml:"retryInterval" default:"60s"`
NodeRecords []string `yaml:"nodeRecords"`
RPCEndpoints []string `yaml:"rpcEndpoints"`
PollingInterval time.Duration `yaml:"pollingInterval" default:"10s"`
TransactionFilters TransactionFilterConfig `yaml:"transactionFilters"`
}
Config holds the source configuration.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics provides Prometheus metrics for source operations.
func NewMetrics ¶
NewMetrics creates a new Metrics instance.
func NewMetricsWithRegisterer ¶ added in v0.2.0
func NewMetricsWithRegisterer(namespace string, registerer prometheus.Registerer) *Metrics
NewMetricsWithRegisterer creates a new Metrics instance with a custom registerer. Pass nil to skip metrics registration (useful for tests).
func (*Metrics) IncNewTxHashesCount ¶ added in v0.1.0
IncNewTxHashesCount increments the new transaction hashes counter.
func (*Metrics) IncReceivedTxCount ¶ added in v0.1.0
IncReceivedTxCount increments the received transaction counter.
type TransactionFilterConfig ¶
TransactionFilterConfig defines transaction filtering rules.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cache provides caching mechanisms for transaction deduplication and tracking.
|
Package cache provides caching mechanisms for transaction deduplication and tracking. |
|
Package p2p provides P2P-based transaction source functionality.
|
Package p2p provides P2P-based transaction source functionality. |
|
Package rpc provides RPC-based transaction source functionality.
|
Package rpc provides RPC-based transaction source functionality. |
Click to show internal directories.
Click to hide internal directories.