Documentation
¶
Index ¶
- Variables
- type Injector
- func (f *Injector) Connect(ctx context.Context) error
- func (f *Injector) Disconnect() error
- func (f *Injector) GetConnectionMetrics() (int64, int64, string, string, time.Time)
- func (f *Injector) Health() driver.HealthStatus
- func (f *Injector) Init(cfg model.DriverConfig) error
- func (f *Injector) ReadPoints(ctx context.Context, points []model.Point) (map[string]model.Value, error)
- func (f *Injector) SetDeviceConfig(config map[string]any) error
- func (f *Injector) SetSlaveID(slaveID uint8) error
- func (f *Injector) WritePoint(ctx context.Context, point model.Point, value any) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInjectedDrop = errors.New("injected request drop")
Functions ¶
This section is empty.
Types ¶
type Injector ¶
type Injector struct {
Underlying driver.Driver
Latency time.Duration
DropNextN int
CorruptNextResponse bool
HalfOpenDuration time.Duration
RotateFaultModes bool
// contains filtered or unexported fields
}
Injector wraps a driver.Driver and applies configurable faults for tests.
func (*Injector) Disconnect ¶
func (*Injector) GetConnectionMetrics ¶
func (*Injector) Health ¶
func (f *Injector) Health() driver.HealthStatus
func (*Injector) ReadPoints ¶
func (*Injector) SetSlaveID ¶
Click to show internal directories.
Click to hide internal directories.