onefinestay/nameko — pull request #155 by mattbennett (2014-09-24 16:28:27+00:00)
Title: WIP; require config in each entrypoint/dependency

Potential pattern to support entrypoints/dependencies with non-global config. Raised for discussion.

Summary:

* You should be able to pass individually relevant config values into entrypoints/dependencies
* These may be bare values _or_ a callable that returns the value when called with the hosting ``container``
* Changes applied here for ``@timer``, ``@rpc`` and ``rpc_proxy``
* The timer implementation works fine

This pattern fundamentally clashes with the re-use of ``RpcConsumer``s and ``QueueConsumer``s by multiple ``RpcProvider`` instances (which may now use different AMQP URIs). Now may be the right time to rebuild our RPC implementation around shared channels, rather than shared dependencies.