error_simulator

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResetErrorSimulatorManager

func ResetErrorSimulatorManager()

Types

type ErrorSimulator

type ErrorSimulator interface {
	RaiseErrorOnNextCall(err error, methodName string)
	SetCallback(errorSimulatorMethodCallback ErrorSimulatorMethodCallback)
}

type ErrorSimulatorConnectCallback

type ErrorSimulatorConnectCallback interface {
	GetErrorToRaise(hostInfo *host_info_util.HostInfo, props map[string]string, isInitialConnection bool) error
}

type ErrorSimulatorManager

type ErrorSimulatorManager struct {
	NextError       error
	ConnectCallback ErrorSimulatorConnectCallback
}

func GetErrorSimulatorManager

func GetErrorSimulatorManager() *ErrorSimulatorManager

func (*ErrorSimulatorManager) RaiseErrorOnNextConnect

func (e *ErrorSimulatorManager) RaiseErrorOnNextConnect(err error)

func (*ErrorSimulatorManager) SetCallback

func (e *ErrorSimulatorManager) SetCallback(errorSimulatorConnectCallback ErrorSimulatorConnectCallback)

type ErrorSimulatorMethodCallback

type ErrorSimulatorMethodCallback interface {
	GetErrorToRaise(methodName string, methodArgs ...any) error
}

Jump to

Keyboard shortcuts

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