Classes

Classes

CBObserver
CBStats
CircuitBreaker
OpenCircuitError
RequestCircuitBreaker
TimeoutError

Events

batch

Batch event. The keys of the object are the names of the circuit breakers.
The values of the object are arrays of CircuitBreaker#event:interval.

Type:
  • object
Source:

callback

Callback event. Emitted on calls which do not timeout.

Type:
  • object
Properties:
Name Type Description
args array

Array or arguments in exec() call

start integer

Timestamp of the start of the call

end integer

Timestamp of the end of the call

result array

Array of arguments with which callback was called

Source:

interval

Interval event

Type:
  • object
Properties:
Name Type Description
start integer

Timestamp of start of the interval

end integer

Timestamp of the end of the interval

state string

Circuit's current state

active integer

Calls currently running

queued integer

Calls currently queued

total integer

Total calls

success integer

Total success calls

totalErrors integer

Total failed calls

errors object

Error counts by type

Properties
Name Type Description
TimeoutError integer

Total calls which timedout - if any

OpenCircuitError integer

Total calls which were rejected (short-circuit) - if any

times array

Times of successful calls in milliseconds

Source:

callback

Callback event. Emitted on calls which do not timeout.

Type:
  • object
Properties:
Name Type Description
args array

Array or arguments in exec() call

start integer

Timestamp of the start of the call

end integer

Timestamp of the end of the call

result array

Array of arguments with which callback was called

Inherited From:
Source:

interval

Interval event

Type:
  • object
Properties:
Name Type Description
start integer

Timestamp of start of the interval

end integer

Timestamp of the end of the interval

state string

Circuit's current state

active integer

Calls currently running

queued integer

Calls currently queued

total integer

Total calls

success integer

Total success calls

totalErrors integer

Total failed calls

errors object

Error counts by type

Properties
Name Type Description
TimeoutError integer

Total calls which timedout - if any

OpenCircuitError integer

Total calls which were rejected (short-circuit) - if any

times array

Times of successful calls in milliseconds

Inherited From:
Source: