// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT.

package main

import (
	"go.opentelemetry.io/collector/component"
	{{- range .Exporters}}
	{{.Name}} "{{.Import}}"
	{{- end}}
	{{- range .Extensions}}
	{{.Name}} "{{.Import}}"
	{{- end}}
	{{- range .Processors}}
	{{.Name}} "{{.Import}}"
	{{- end}}
	{{- range .Receivers}}
	{{.Name}} "{{.Import}}"
	{{- end}}
)

func components() (component.Factories, error) {
	var err error
	factories := component.Factories{}

	factories.Extensions, err = component.MakeExtensionFactoryMap(
		{{- range .Extensions}}
		{{.Name}}.NewFactory(),
		{{- end}}
	)
	if err != nil {
		return component.Factories{}, err
	}

	factories.Receivers, err = component.MakeReceiverFactoryMap(
		{{- range .Receivers}}
		{{.Name}}.NewFactory(),
		{{- end}}
	)
	if err != nil {
		return component.Factories{}, err
	}

	factories.Exporters, err = component.MakeExporterFactoryMap(
		{{- range .Exporters}}
		{{.Name}}.NewFactory(),
		{{- end}}
	)
	if err != nil {
		return component.Factories{}, err
	}

	factories.Processors, err = component.MakeProcessorFactoryMap(
		{{- range .Processors}}
		{{.Name}}.NewFactory(),
		{{- end}}
	)
	if err != nil {
		return component.Factories{}, err
	}

	return factories, nil
}
