relaycoretest

package
v5.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package relaycoretest provides test utilities for relay processor tests. This package should only be imported by test files.

Index

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL