Documentation ¶
Index ¶
- Constants
- func StartMetricsServer(ctx context.Context, metricsAddr string, reg prometheus.Gatherer, ...)
- type EventListener
- type Relayer
- type SelectiveListener
- func (l *SelectiveListener) OnBlockReceived()
- func (l *SelectiveListener) OnDaSubmissionFailed()
- func (l *SelectiveListener) OnDaSubmitted(duration time.Duration)
- func (l *SelectiveListener) OnExpiredTx()
- func (l *SelectiveListener) OnInvalidNonce()
- func (l *SelectiveListener) OnRetriesRequired(retries int)
- func (l *SelectiveListener) OnTimeoutTx()
Constants ¶
View Source
const ( NAMESPACE_ID = 1 SUBMIT_BLOCK_INTERVAL = 2500 * time.Millisecond SUBMIT_BLOCK_RETRY_TIMEOUT = 2 * time.Second SUBMIT_BLOCK_RETRIES = 3 )
View Source
const RelayerNamespace = "sffl_relayer"
Variables ¶
This section is empty.
Functions ¶
func StartMetricsServer ¶
func StartMetricsServer(ctx context.Context, metricsAddr string, reg prometheus.Gatherer, logger sdklogging.Logger)
Types ¶
type EventListener ¶
type EventListener interface { OnBlockReceived() OnDaSubmissionFailed() OnDaSubmitted(duration time.Duration) OnRetriesRequired(retries int) OnInvalidNonce() OnExpiredTx() OnTimeoutTx() }
func MakeRelayerMetrics ¶
func MakeRelayerMetrics(registry *prometheus.Registry) (EventListener, error)
type Relayer ¶
type Relayer struct {
// contains filtered or unexported fields
}
func NewRelayerFromConfig ¶
func NewRelayerFromConfig(config *config.RelayerConfig, logger sdklogging.Logger) (*Relayer, error)
func (*Relayer) EnableMetrics ¶
func (r *Relayer) EnableMetrics(registry *prometheus.Registry) error
type SelectiveListener ¶
type SelectiveListener struct { OnBlockReceivedCb func() OnDaSubmissionFailedCb func() OnDaSubmittedCb func(duration time.Duration) OnRetriesRequiredCb func(retries int) OnInvalidNonceCb func() OnExpiredTxCb func() OnTimeoutTxCb func() }
func (*SelectiveListener) OnBlockReceived ¶
func (l *SelectiveListener) OnBlockReceived()
func (*SelectiveListener) OnDaSubmissionFailed ¶
func (l *SelectiveListener) OnDaSubmissionFailed()
func (*SelectiveListener) OnDaSubmitted ¶
func (l *SelectiveListener) OnDaSubmitted(duration time.Duration)
func (*SelectiveListener) OnExpiredTx ¶
func (l *SelectiveListener) OnExpiredTx()
func (*SelectiveListener) OnInvalidNonce ¶
func (l *SelectiveListener) OnInvalidNonce()
func (*SelectiveListener) OnRetriesRequired ¶
func (l *SelectiveListener) OnRetriesRequired(retries int)
func (*SelectiveListener) OnTimeoutTx ¶
func (l *SelectiveListener) OnTimeoutTx()
Click to show internal directories.
Click to hide internal directories.