Documentation
¶
Overview ¶
Package bridge coordinates transaction bridging between source and target networks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidMode is returned when an invalid mode is specified ErrInvalidMode = errors.New("mode must be either 'p2p' or 'rpc'") )
View Source
var ( // ErrUnknownMode is returned when an unsupported mode is provided ErrUnknownMode = errors.New("unknown mode") )
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct {
Cfg Config
// contains filtered or unexported fields
}
Bridge coordinates transaction flow from source to target networks.
func (*Bridge) ServeMetrics ¶
ServeMetrics starts the metrics HTTP server.
type Config ¶
type Config struct {
LoggingLevel string `yaml:"logging" default:"info"`
MetricsAddr string `yaml:"metricsAddr" default:":9090"`
Mode Mode `yaml:"mode" default:"p2p"`
Source source.Config `yaml:"source"`
Target target.Config `yaml:"target"`
}
Config holds the bridge configuration.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics provides Prometheus metrics for the bridge.
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) AddTransactions ¶
AddTransactions increments the transaction counter by the given count.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package source provides transaction source implementations for the bridge.
|
Package source provides transaction source implementations for the bridge. |
|
cache
Package cache provides caching mechanisms for transaction deduplication and tracking.
|
Package cache provides caching mechanisms for transaction deduplication and tracking. |
|
p2p
Package p2p provides P2P-based transaction source functionality.
|
Package p2p provides P2P-based transaction source functionality. |
|
rpc
Package rpc provides RPC-based transaction source functionality.
|
Package rpc provides RPC-based transaction source functionality. |
|
Package target provides transaction target implementations for the bridge.
|
Package target provides transaction target implementations for the bridge. |
|
p2p
Package p2p provides P2P-based transaction target functionality.
|
Package p2p provides P2P-based transaction target functionality. |
|
rpc
Package rpc provides RPC-based transaction target functionality.
|
Package rpc provides RPC-based transaction target functionality. |
Click to show internal directories.
Click to hide internal directories.