config Package - Component configurators¶
config
Package¶
This subpackage is meant to contain configuration directives of validation and normalization as well as defaults. The current plan is to use mozilla/configman package. Ultimately there is one goal there. Avoid any runtime errors because of a broken configuration value being used at a later stage in execution at which point due to not having been validated would cause the system to break. Validation and normalization eliminates this problem completely. This means At startup time we can be sure that all of the configuration values match the requirements of successful operation.
Further on there is the requirement of the code to be independent from the configurator. The code needs to be written in a way that the modules are self-contained and only expect their dependencies to have a particular interface but not knowing about the details of their configuration. Therefore in the modules dependency injection is used. In turn however these configurator classes are here to make sure the configuration is possible via a single structured configuration file or environment variables or command line argument overrides.
The mozilla/configman package gives a modular way of writing a complex configuration factory that is controllable by file, environment and command line arguments. This gives great flexibility as the configuration of the individual modules can be self-contained as much as possible yet it is possible to have system-wide configuration parameters, such as a HTTP proxy.
backend
module¶
-
class
ebu_tt_live.config.backend.
BackendBase
(config, local_config)[source]¶
-
class
ebu_tt_live.config.backend.
TwistedBackend
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.backend.BackendBase
-
call_periodically
(func, interval=0.0, result_callback=None, error_callback=None, *args, **kwargs)[source]¶
-
required_config
= <configman.namespace.Namespace object>¶
-
ws_backend_producer
(custom_producer, listen=None, connect=None, proxy=None)[source]¶ - The following cases to be considered.
- There is listen address
- 1.1. The address is used by another producer: ERROR 1.2. The address is used by another protocol: ERROR 1.3. The address is used by a consumer server: create producer and assign it to the factory 1.4. The address is not in use: Create factory and create producer
- There are connections to make with publish action
- 2.1 There is a producer from the server. Use that. Create client factories with it. 2.2 There is no producer from the server. Create producer, create client factories with it.
Parameters: - custom_producer –
- listen –
- connect –
- proxy –
Returns: The Twisted Producer instance with server socket and/or client connections
-
node
module¶
-
class
ebu_tt_live.config.node.
BufferDelay
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.node.ConsumerMixin
,ebu_tt_live.config.node.ProducerMixin
,ebu_tt_live.config.node.NodeBase
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
ConsumerMixin
[source]¶ Bases:
configman.required_config.RequiredConfig
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
DeDuplicator
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.node.ConsumerMixin
,ebu_tt_live.config.node.ProducerMixin
,ebu_tt_live.config.node.NodeBase
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
Distributor
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.node.ConsumerMixin
,ebu_tt_live.config.node.ProducerMixin
,ebu_tt_live.config.node.NodeBase
-
class
ebu_tt_live.config.node.
EBUTTDEncoder
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.node.ProducerMixin
,ebu_tt_live.config.node.ConsumerMixin
,ebu_tt_live.config.node.NodeBase
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
Handover
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.node.ConsumerMixin
,ebu_tt_live.config.node.ProducerMixin
,ebu_tt_live.config.node.NodeBase
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
NodeBase
(config, local_config, backend=None)[source]¶ Bases:
ebu_tt_live.config.common.ConfigurableComponent
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
ProducerMixin
[source]¶ Bases:
configman.required_config.RequiredConfig
-
output
= None¶
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
ReSequencer
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.node.ProducerMixin
,ebu_tt_live.config.node.ConsumerMixin
,ebu_tt_live.config.node.NodeBase
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
RetimingDelay
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.node.ConsumerMixin
,ebu_tt_live.config.node.ProducerMixin
,ebu_tt_live.config.node.NodeBase
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
SimpleConsumer
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.node.ConsumerMixin
,ebu_tt_live.config.node.NodeBase
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
SimpleProducer
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.node.ProducerMixin
,ebu_tt_live.config.node.NodeBase
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
UniversalNode
[source]¶ Bases:
configman.required_config.RequiredConfig
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.node.
UniversalNodeList
(config, local_config, backend=None)[source]¶ Bases:
ebu_tt_live.config.common.ConfigurableComponent
-
classmethod
configure_component
(config, local_config, **kwargs)[source]¶ This is a class method to either return an instance that already exists or create one. :param config: :param local_config: :param kwargs: Extra parameters :return: Instance of ConfigurableComponent
-
node1
= <configman.namespace.Namespace object>¶
-
node2
= <configman.namespace.Namespace object>¶
-
node3
= <configman.namespace.Namespace object>¶
-
node4
= <configman.namespace.Namespace object>¶
-
node5
= <configman.namespace.Namespace object>¶
-
node6
= <configman.namespace.Namespace object>¶
-
node7
= <configman.namespace.Namespace object>¶
-
required_config
= <configman.namespace.Namespace object>¶
-
classmethod
carriage
Package¶
-
class
ebu_tt_live.config.carriage.
DirectCommon
(config, local_config, **kwargs)[source]¶ Bases:
ebu_tt_live.config.common.ConfigurableComponent
-
classmethod
configure_component
(config, local_config, **kwargs)[source]¶ This is a class method to either return an instance that already exists or create one. :param config: :param local_config: :param kwargs: Extra parameters :return: Instance of ConfigurableComponent
-
required_config
= <configman.namespace.Namespace object>¶
-
classmethod
-
class
ebu_tt_live.config.carriage.
FilesystemInput
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.common.ConfigurableComponent
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.carriage.
FilesystemOutput
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.common.ConfigurableComponent
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.carriage.
WebsocketBase
(config, local_config, backend=None)[source]¶ Bases:
ebu_tt_live.config.common.ConfigurableComponent
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.carriage.
WebsocketInput
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.carriage.WebsocketBase
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.carriage.
WebsocketLegacyBase
(config, local_config, backend=None)[source]¶ Bases:
ebu_tt_live.config.common.ConfigurableComponent
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.carriage.
WebsocketLegacyInput
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.carriage.WebsocketLegacyBase
-
required_config
= <configman.namespace.Namespace object>¶
-
-
class
ebu_tt_live.config.carriage.
WebsocketOutput
(config, local_config)[source]¶ Bases:
ebu_tt_live.config.carriage.WebsocketBase
-
required_config
= <configman.namespace.Namespace object>¶
-
adapters
module¶
-
class
ebu_tt_live.config.adapters.
ConsumerNodeCarriageAdapter
(config, local_config, backend=None)[source]¶ Bases:
ebu_tt_live.config.common.ConfigurableComponent
-
classmethod
configure_component
(config, local_config, consumer=None, carriage=None, **kwargs)[source]¶ This is a class method to either return an instance that already exists or create one. :param config: :param local_config: :param kwargs: Extra parameters :return: Instance of ConfigurableComponent
-
classmethod
-
class
ebu_tt_live.config.adapters.
ProducerNodeCarriageAdapter
(config, local_config, backend=None)[source]¶ Bases:
ebu_tt_live.config.common.ConfigurableComponent
-
classmethod
configure_component
(config, local_config, producer=None, carriage=None, **kwargs)[source]¶ This is a class method to either return an instance that already exists or create one. :param config: :param local_config: :param kwargs: Extra parameters :return: Instance of ConfigurableComponent
-
classmethod
clocks
module¶
-
class
ebu_tt_live.config.clocks.
DummyClock
(config, local_config, backend=None)[source]¶ Bases:
ebu_tt_live.config.common.ConfigurableComponent
This wrapper returns None for reference clock allowing the consumer to create a reference clock from the first document received
-
component
= None¶
-
common
module¶
-
class
ebu_tt_live.config.common.
ConfigurableComponent
(config, local_config, backend=None)[source]¶ Bases:
configman.required_config.RequiredConfig
-
backend
¶
-
component
= None¶
-
config
= None¶
-
classmethod
configure_component
(config, local_config, **kwargs)[source]¶ This is a class method to either return an instance that already exists or create one. :param config: :param local_config: :param kwargs: Extra parameters :return: Instance of ConfigurableComponent
-
required_config
= <configman.namespace.Namespace object>¶
-