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.
241 242 243 244 |
# File 'lib/faulty.rb', line 241 def initialize(**, &) @options = Options.new(, &) @registry = CircuitRegistry.new() end |