Documentation
¶
Overview ¶
Package relaycoretest provides test utilities for relay processor tests. This package should only be imported by test files.
Index ¶
- Variables
- func SendNodeError(relayProcessor *relaycore.RelayProcessor, provider string, delay time.Duration)
- func SendNodeErrorJsonRpc(relayProcessor *relaycore.RelayProcessor, provider string, delay time.Duration)
- func SendProtocolError(relayProcessor *relaycore.RelayProcessor, provider string, delay time.Duration, ...)
- func SendSuccessResp(relayProcessor *relaycore.RelayProcessor, provider string, delay time.Duration)
- func SendSuccessRespJsonRpc(relayProcessor *relaycore.RelayProcessor, provider string, delay time.Duration)
- type RelayProcessorMetricsMock
- func (romm *RelayProcessorMetricsMock) GetChainIdAndApiInterface() (string, string)
- func (romm *RelayProcessorMetricsMock) SetNodeErrorRecoveredSuccessfullyMetric(chainId string, apiInterface string, attempt string)
- func (romm *RelayProcessorMetricsMock) SetProtocolErrorRecoveredSuccessfullyMetric(chainId string, apiInterface string, attempt string)
- func (romm *RelayProcessorMetricsMock) SetRelayNodeErrorMetric(providerAddress, chainId, apiInterface string)
- func (romm *RelayProcessorMetricsMock) SetRelaySentByNewBatchTickerMetric(chainId string, apiInterface string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // RelayRetriesManagerInstance is a shared instance for tests RelayRetriesManagerInstance = lavaprotocol.NewRelayRetriesManager() // RelayProcessorMetrics is a mock metrics implementation for tests RelayProcessorMetrics = &RelayProcessorMetricsMock{} )
Functions ¶
func SendNodeError ¶
func SendNodeError(relayProcessor *relaycore.RelayProcessor, provider string, delay time.Duration)
SendNodeError sends a node error response to the relay processor
func SendNodeErrorJsonRpc ¶
func SendNodeErrorJsonRpc(relayProcessor *relaycore.RelayProcessor, provider string, delay time.Duration)
SendNodeErrorJsonRpc sends a JSON-RPC node error response to the relay processor
func SendProtocolError ¶
func SendProtocolError(relayProcessor *relaycore.RelayProcessor, provider string, delay time.Duration, err error)
SendProtocolError sends a protocol error response to the relay processor
func SendSuccessResp ¶
func SendSuccessResp(relayProcessor *relaycore.RelayProcessor, provider string, delay time.Duration)
SendSuccessResp sends a successful response to the relay processor
func SendSuccessRespJsonRpc ¶
func SendSuccessRespJsonRpc(relayProcessor *relaycore.RelayProcessor, provider string, delay time.Duration)
SendSuccessRespJsonRpc sends a successful JSON-RPC response to the relay processor
Types ¶
type RelayProcessorMetricsMock ¶
type RelayProcessorMetricsMock struct{}
RelayProcessorMetricsMock is a mock implementation of metrics interfaces for testing
func (*RelayProcessorMetricsMock) GetChainIdAndApiInterface ¶
func (romm *RelayProcessorMetricsMock) GetChainIdAndApiInterface() (string, string)
func (*RelayProcessorMetricsMock) SetNodeErrorRecoveredSuccessfullyMetric ¶
func (romm *RelayProcessorMetricsMock) SetNodeErrorRecoveredSuccessfullyMetric(chainId string, apiInterface string, attempt string)
func (*RelayProcessorMetricsMock) SetProtocolErrorRecoveredSuccessfullyMetric ¶
func (romm *RelayProcessorMetricsMock) SetProtocolErrorRecoveredSuccessfullyMetric(chainId string, apiInterface string, attempt string)
func (*RelayProcessorMetricsMock) SetRelayNodeErrorMetric ¶
func (romm *RelayProcessorMetricsMock) SetRelayNodeErrorMetric(providerAddress, chainId, apiInterface string)
func (*RelayProcessorMetricsMock) SetRelaySentByNewBatchTickerMetric ¶
func (romm *RelayProcessorMetricsMock) SetRelaySentByNewBatchTickerMetric(chainId string, apiInterface string)
Click to show internal directories.
Click to hide internal directories.