class Faulty::Storage::Null
A no-op backend for disabling circuits
Public Class Methods
new()
click to toggle source
# File lib/faulty/storage/null.rb, line 10 def self.new @instance end
Public Instance Methods
close(_circuit)
click to toggle source
@param (see Interface#close
) @return (see Interface#close
)
# File lib/faulty/storage/null.rb, line 34 def close(_circuit) true end
entry(_circuit, _time, _success)
click to toggle source
@param (see Interface#entry
) @return (see Interface#entry
)
# File lib/faulty/storage/null.rb, line 16 def entry(_circuit, _time, _success) [] end
fault_tolerant?()
click to toggle source
This backend is fault tolerant
@param (see Interface#fault_tolerant?
) @return (see Interface#fault_tolerant?
)
# File lib/faulty/storage/null.rb, line 78 def fault_tolerant? true end
history(_circuit)
click to toggle source
@param (see Interface#history
) @return (see Interface#history
)
# File lib/faulty/storage/null.rb, line 64 def history(_circuit) [] end
list()
click to toggle source
@param (see Interface#list
) @return (see Interface#list
)
# File lib/faulty/storage/null.rb, line 70 def list [] end
lock(_circuit, _state)
click to toggle source
@param (see Interface#lock
) @return (see Interface#lock
)
# File lib/faulty/storage/null.rb, line 40 def lock(_circuit, _state) end
open(_circuit, _opened_at)
click to toggle source
@param (see Interface#open
) @return (see Interface#open
)
# File lib/faulty/storage/null.rb, line 22 def open(_circuit, _opened_at) true end
reopen(_circuit, _opened_at, _previous_opened_at)
click to toggle source
@param (see Interface#reopen
) @return (see Interface#reopen
)
# File lib/faulty/storage/null.rb, line 28 def reopen(_circuit, _opened_at, _previous_opened_at) true end
reset(_circuit)
click to toggle source
@param (see Interface#reset
) @return (see Interface#reset
)
# File lib/faulty/storage/null.rb, line 50 def reset(_circuit) end
status(circuit)
click to toggle source
@param (see Interface#status
) @return (see Interface#status
)
# File lib/faulty/storage/null.rb, line 55 def status(circuit) Faulty::Status.new( options: circuit.options, stub: true ) end
unlock(_circuit)
click to toggle source
@param (see Interface#unlock
) @return (see Interface#unlock
)
# File lib/faulty/storage/null.rb, line 45 def unlock(_circuit) end