Method: Faulty#initialize
- Defined in:
- lib/faulty.rb
#initialize(**options) {|Options| ... } ⇒ Faulty
Create a new Faulty instance
Note, the process of creating a new instance is not thread safe, so make sure instances are setup during your application's initialization phase.
For the most part, Faulty instances are independent, however for some cache and storage backends, you will need to ensure that the cache keys and circuit names don't overlap between instances. For example, if using the Faulty::Storage::Redis storage backend, you should specify different key prefixes for each instance.
239 240 241 242 |
# File 'lib/faulty.rb', line 239 def initialize(**, &block) @options = Options.new(, &block) @registry = CircuitRegistry.new() end |