ComponentConfig

Configuration of a component inside a container.

Description

The ComponentConfig class allows you to configure a component residing inside a container.

Important points

  • The configuration includes the type of information or descriptor and component configuration parameters.

Fields

descriptor

Component’s descriptor (locator).

descriptor: Descriptor

type

Component’s type descriptor.

type: TypeDescriptor

config

Component’s configuration parameters.

config: ConfigParams

Constructors

Creates a new instance of the configuration component.

ComponentConfig(descriptor: Descriptor = None, type: TypeDescriptor = None, config: ConfigParams = None)

  • descriptor: Descriptor - (optional) component’s descriptor (locator).
  • type: TypeDescriptor - (optional) component’s type descriptor.
  • config: ConfigParams - (optional) component’s configuration parameters.

Static methods

from_config

Creates a new instance of ComponentConfig based on a section from a container configuration. Throws ConfigException when neither component descriptor or type is found.

static from_config(config: ConfigParams): ComponentConfig