Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
injectGrpcFaults
injectGrpcFaults injects gRPC faults in the requests served by a target Service.
Parameters | Type | Description |
---|---|---|
fault | object | description of the gRPC faults to be injected |
duration | string | duration of the disruption |
options (optional) | object | options that control the injection of the fault |
Options
The injection of the fault is controlled by the following options:
Option | Type | Description |
---|---|---|
proxyPort | number | port the agent will use to listen for requests in the target pods ( default 8000 ) |
Example
const fault = {
averageDelay: '50ms',
statusCode: 13,
errorRate: 0.1,
};
disruptor.injectGrpcFaults(fault, '30s');