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.

Constructors

NewComponentConfigFromType

Creates a new instance of the configuration component.

NewComponentConfigFromType(typ *reflect.TypeDescriptor, config *config.ConfigParams) *config.ConfigParams

NewComponentConfigFromDescriptor

Creates a new instance of the configuration component.

NewComponentConfigFromDescriptor(descriptor *refer.Descriptor, config *config.ConfigParams) *ComponentConfig

Fields

Descriptor

Component’s descriptor (locator).

Descriptor: Descriptor

Type

Component’s type descriptor.

Type: TypeDescriptor

Config

Component’s configuration parameters.

Config: ConfigParams

Methods

ReadComponentConfigFromConfig

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

ReadComponentConfigFromConfig(config *config.ConfigParams) (result *ComponentConfig, err error)