Registry¶
-
class
Cauldron.registry.Registry(name, doc=None, modname='Cauldron.DFW')[source] [edit on github]¶ Bases:
objectA registry of setup and teardown functions.
This module contains two
Registryinstances:clientanddispatcher. They serve as the setup and teardown registries for the KTL client and disptachetr side APIs. Additional setup or teardown functions can be registered usingsetup_for()andteardown_for(). The base keyword and service classes for a particular backend can be set usingkeyword_for()andservice_for(). All of these methods are decorators and can be used as such in the appropriate places:from Cauldron import registry @regsitry.client.setup_for("mybackend") def mysetup(): # Do some setup work here! pass
Attributes Summary
KeywordThe Keyword class. ServiceThe Service class. backendGet the backend name. Methods Summary
guard(msg[, error])Guard against backends that aren’t set up. keys()Return the active and available registry keys. keyword_for(backend[, keyword])Register a keyword class. service_for(backend[, service])Register a service setup()Do the setup process. setup_for(backend)Register a setup function. teardown()Do the teardown process. teardown_for(backend)Register a teardown function. use(backend)Set the backend. Attributes Documentation
-
Keyword¶ The Keyword class.
-
Service¶ The Service class.
-
backend¶ Get the backend name.
Methods Documentation
-
guard(msg, error=<type 'exceptions.RuntimeError'>)[source] [edit on github]¶ Guard against backends that aren’t set up.
-
keys()[source] [edit on github]¶ Return the active and available registry keys.
-
keyword_for(backend, keyword=None)[source] [edit on github]¶ Register a keyword class.
-
service_for(backend, service=None)[source] [edit on github]¶ Register a service
-
setup()[source] [edit on github]¶ Do the setup process.
-
setup_for(backend)[source] [edit on github]¶ Register a setup function.
-
teardown()[source] [edit on github]¶ Do the teardown process.
-
teardown_for(backend)[source] [edit on github]¶ Register a teardown function.
-
use(backend)[source] [edit on github]¶ Set the backend.
-