checking

package
v0.0.0-...-610b79d Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: LGPL-3.0 Imports: 22 Imported by: 0

Documentation

Overview

Package checking is a generated GoMock package.

Package checking is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterNetworkCheck

func RegisterNetworkCheck(name string, factory Factory)

RegisterNetworkCheck registers a new Checker via its factory.

Types

type Checker

type Checker interface {
	Check(ctx context.Context) error
	Configure(CheckerConfig) Checker
}

Checker does the consistency check at the end of the scenario.

func NewFailingChecker

func NewFailingChecker(checker Checker) Checker

NewFailingChecker returns checks if an input Checker returns an error

type CheckerConfig

type CheckerConfig map[string]any

func (*CheckerConfig) Check

func (config *CheckerConfig) Check() error

type Checks

type Checks map[string]Checker

Checks is a slice of Checker.

func InitNetworkChecks

func InitNetworkChecks(network driver.Network, monitor *monitoring.Monitor) Checks

InitNetworkChecks initializes the Checks with the given network.

func (Checks) Check

func (c Checks) Check(ctx context.Context) error

Check executes all checkers and returns an error if any of them find an issue.

func (Checks) GetCheckerByName

func (c Checks) GetCheckerByName(name string) Checker

GetCheckerByName retrieves a Checker by its name. It returns nil if the Checker is not found.

type Factory

type Factory func(driver.Network, *monitoring.Monitor) Checker

Factory is a function that creates a Checker.

type MockChecker

type MockChecker struct {
	// contains filtered or unexported fields
}

MockChecker is a mock of Checker interface.

func NewMockChecker

func NewMockChecker(ctrl *gomock.Controller) *MockChecker

NewMockChecker creates a new mock instance.

func (*MockChecker) Check

func (m *MockChecker) Check(ctx context.Context) error

Check mocks base method.

func (*MockChecker) Configure

func (m *MockChecker) Configure(arg0 CheckerConfig) Checker

Configure mocks base method.

func (*MockChecker) EXPECT

func (m *MockChecker) EXPECT() *MockCheckerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

type MockCheckerMockRecorder

type MockCheckerMockRecorder struct {
	// contains filtered or unexported fields
}

MockCheckerMockRecorder is the mock recorder for MockChecker.

func (*MockCheckerMockRecorder) Check

func (mr *MockCheckerMockRecorder) Check(ctx any) *gomock.Call

Check indicates an expected call of Check.

func (*MockCheckerMockRecorder) Configure

func (mr *MockCheckerMockRecorder) Configure(arg0 any) *gomock.Call

Configure indicates an expected call of Configure.

type MockMonitoringData

type MockMonitoringData struct {
	// contains filtered or unexported fields
}

MockMonitoringData is a mock of MonitoringData interface.

func NewMockMonitoringData

func NewMockMonitoringData(ctrl *gomock.Controller) *MockMonitoringData

NewMockMonitoringData creates a new mock instance.

func (*MockMonitoringData) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMonitoringData) GetBlockGasRate

GetBlockGasRate mocks base method.

func (*MockMonitoringData) GetBlockStatus

GetBlockStatus mocks base method.

func (*MockMonitoringData) GetNodes

func (m *MockMonitoringData) GetNodes() []monitoring.Node

GetNodes mocks base method.

type MockMonitoringDataMockRecorder

type MockMonitoringDataMockRecorder struct {
	// contains filtered or unexported fields
}

MockMonitoringDataMockRecorder is the mock recorder for MockMonitoringData.

func (*MockMonitoringDataMockRecorder) GetBlockGasRate

func (mr *MockMonitoringDataMockRecorder) GetBlockGasRate() *gomock.Call

GetBlockGasRate indicates an expected call of GetBlockGasRate.

func (*MockMonitoringDataMockRecorder) GetBlockStatus

func (mr *MockMonitoringDataMockRecorder) GetBlockStatus(arg0 any) *gomock.Call

GetBlockStatus indicates an expected call of GetBlockStatus.

func (*MockMonitoringDataMockRecorder) GetNodes

func (mr *MockMonitoringDataMockRecorder) GetNodes() *gomock.Call

GetNodes indicates an expected call of GetNodes.

type MonitoringData

type MonitoringData interface {
	// GetNodes returns the nodes that are being monitored.
	GetNodes() []monitoring.Node
	// GetBlockStatus returns the monitoring data for a specific node.
	GetBlockStatus(monitoring.Node) monitoring.Series[monitoring.Time, monitoring.BlockStatus]
	// GetBlockGasRate returns the block gas rate for the network.
	GetBlockGasRate() monitoring.Series[monitoring.BlockNumber, float64]
}

MonitoringData is an interface that defines a method to get monitoring data related to this checker.

Jump to

Keyboard shortcuts

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