# following section headers. |
# following section headers. |
|
|
load.settings.from = "peak.config.config_components.do_include" |
load.settings.from = "peak.config.config_components.do_include" |
provide.utilities = "peak.config.config_components.provide_utility" |
|
load.on.demand = "peak.config.config_components.on_demand" |
load.on.demand = "peak.config.config_components.on_demand" |
|
component.factories = "peak.config.config_components.register_factory" |
|
|
|
# "Provide Utilities" is DEPRECATED |
|
provide.utilities = "peak.config.config_components.provide_utility" |
|
|
|
|
[peak.config.loaders] |
[peak.config.loaders] |
|
|
|
|
|
|
|
|
|
|
|
|
[Load on Demand] |
[Load on Demand] |
|
|
# Settings in load-on-demand sections are evaluated once and *only* once, |
# Settings in load-on-demand sections are evaluated once and *only* once, |
|
|
logfile = "peak.running.logs:logfileURL" |
logfile = "peak.running.logs:logfileURL" |
logging.logger = "peak.running.logs:peakLoggerContext" |
logging.logger = "peak.running.logs:peakLoggerContext" |
|
logger = "peak.running.logs:peakLoggerContext" |
|
|
lockfile = "peak.running.lockfiles:lockfileURL" |
lockfile = "peak.running.lockfiles:lockfileURL" |
nulllockfile = "peak.running.lockfiles:lockfileURL" |
nulllockfile = "peak.running.lockfiles:lockfileURL" |
icb = "peak.net.icb:ICB_URL" |
icb = "peak.net.icb:ICB_URL" |
|
|
|
|
|
|
tcp = "peak.net.sockets.tcpudpURL" |
tcp = "peak.net.sockets.tcpudpURL" |
udp = "peak.net.sockets.tcpudpURL" |
udp = "peak.net.sockets.tcpudpURL" |
unix = "peak.net.sockets.unixURL" |
unix = "peak.net.sockets.unixURL" |
unix.dg = "peak.net.sockets.unixURL" |
unix.dg = "peak.net.sockets.unixURL" |
fd = "peak.net.sockets.fdURL" |
fd.socket = "peak.net.sockets.fdURL" |
|
|
zconfig.schema = "peak.config.load_zconfig:ZConfigSchemaContext" |
zconfig.schema = "peak.config.load_zconfig:ZConfigSchemaContext" |
shellcmd = "peak.naming.factories.shellcmd:ShellCommandCtx" |
shellcmd = "peak.naming.factories.shellcmd:ShellCommandCtx" |
|
|
|
|
|
|
|
|
[peak.metamodels.mof1.3.writers] |
[peak.metamodels.mof1.3.writers] |
|
|
# Functions that can generate objects or code from MOF models |
# Functions that can generate objects or code from MOF models |
test = importString('peak.running.commands:TestRunner') |
test = importString('peak.running.commands:TestRunner') |
|
|
# PEAK's Namespace Navigator |
# PEAK's Namespace Navigator |
n2 = importString('peak.running.tools.n2.main:N2') |
n2 = importString('peak.tools.n2.main:N2') |
|
|
|
|
|
|
|
# PEAK API help |
|
help = importString('peak.tools.api_help:APIHelp') |
|
|
|
|
# 'supervise' multiprocess manager |
# 'supervise' multiprocess manager |
supervise = |
supervise = |
naming.LinkRef('zconfig.schema:pkgfile:peak.running/Supervisor.xml') |
naming.LinkRef( |
|
'zconfig.schema:pkgfile:peak.tools/supervisor/Supervisor.xml' |
|
) |
|
|
# 'FastCGI' port listener |
# 'FastCGI' port listener |
FastCGI = importString('peak.running.supervisor:FCGITemplateCommand') |
FastCGI = importString('peak.tools.supervisor.fastcgi:FCGITemplateCommand') |
|
|
|
|
# PEAK versioning tool |
# PEAK versioning tool |
targetObj, |
targetObj, |
command = [ |
command = [ |
'runIni', |
'runIni', |
config.fileNearModule('peak.running.tools.version','version.ini') |
config.fileNearModule('peak.tools.version','version.ini') |
] |
] |
) |
) |
|
|
|
|
|
|
|
|
|
[Component Factories] |
|
|
|
# "Component Factories" sections define utilities by mapping from an import |
|
# string for an interface (or other configuration key), to an expression |
|
# that returns the factory (or an import string thereof). |
|
|
|
# Factories described here are not actually registered with the configuration |
|
# map until the module named on the left side of the '=' is first imported. If |
|
# the module is already imported when a "Component Factories" section is |
|
# processed, then registration takes place immediately. |
|
|
|
# Keys listed here are registered twice, like this: |
|
# key = importString(key) |
|
# pMap.registerProvider(config.FactoryFor(key), config.ruleForExpr(value)) |
|
# pMap.registerProvider(key, config.CreateViaFactory(key)) |
|
|
|
# This means that looking up a key listed here will use a 'CreateViaFactory' |
|
# rule to invoke the factory once and return that result for all subsequent |
|
# lookups. Looking up 'config.FactoryFor(key)' will return the factory listed |
|
# here on the right side of the '=' sign. Thus, using 'binding.Make(key)' will |
|
# create a private instance of the desired component, and 'binding.Obtain(key)' |
|
# will retrieve a shared instance. |
|
|
|
# Note, by the way, that the items named on the left of the '=' do not have to |
|
# be interfaces, although that is the most common usage. They may be any |
|
# object that supports 'config.IConfigKey'. |
|
|
[Provide Utilities] |
|
|
|
# "Provide Utilities" sections define utilities by mapping from an import |
|
# string for an interface, to an expression defining the Provider. |
|
# |
|
# Note that unlike property sections, code in "Provide utilities" sections is |
|
# executed immediately to create a provider rule, not on-demand when the |
|
# utility is actually requested, so you should avoid code that does unnecessary |
|
# importing. You'll notice that most providers shown here do their imports |
|
# inside of lambdas within config.provideInstance() or |
|
# config.instancePerComponent() calls. |
|
|
|
# This first provider associates a default transaction service with the |
|
# nearest AppConfig above the object that the service is wanted for. It |
|
# creates a TransactionService instance with that config as its parent |
|
# component. |
|
|
|
peak.storage.interfaces.ITransactionService = |
peak.storage.interfaces.ITransactionService = |
config.provideInstance('peak.storage.transactions.TransactionService') |
'peak.storage.transactions.TransactionService' |
|
|
# Some similar services for peak.running: |
|
|
|
peak.running.interfaces.ISignalManager = |
|
config.provideInstance('peak.running.process.SignalManager') |
|
|
|
peak.running.interfaces.IMainLoop = |
|
config.provideInstance('peak.running.scheduler.MainLoop') |
|
|
|
peak.running.interfaces.ITaskQueue = |
|
config.provideInstance('peak.running.daemons.TaskQueue') |
|
|
|
peak.running.interfaces.IBasicReactor = |
|
config.provideInstance('peak.running.scheduler.getReactor') |
|
|
|
peak.running.interfaces.ITwistedReactor = |
peak.running.interfaces.ISignalManager = 'peak.running.process.SignalManager' |
config.provideInstance('peak.running.scheduler.getTwisted') |
peak.running.interfaces.IMainLoop = 'peak.running.scheduler.MainLoop' |
|
peak.running.interfaces.ITaskQueue = 'peak.running.daemons.TaskQueue' |
|
peak.running.interfaces.IBasicReactor = 'peak.running.scheduler.getReactor' |
|
peak.running.interfaces.ITwistedReactor = 'peak.running.scheduler.getTwisted' |
|
|
|
|
|
|