Back to godoc.org
go.opentelemetry.io/collector/service/builder

package builder

v0.4.0
Latest Go to latest
Published: Jun 16, 2020 | License: Apache-2.0 | Module: go.opentelemetry.io/collector

Overview

Package builder handles the options to build the OpenTelemetry collector pipeline.

Index

func Flags

func Flags(flags *flag.FlagSet)

Flags adds flags related to basic building of the collector application to the given flagset.

func GetConfigFile

func GetConfigFile() string

GetConfigFile gets the config file from the config file flag.

func MemBallastSize

func MemBallastSize() int

MemBallastSize returns the size of memory ballast to use in MBs

type BuiltPipelines

type BuiltPipelines map[*configmodels.Pipeline]*builtPipeline

BuiltPipelines is a map of build pipelines created from pipeline configs.

func (BuiltPipelines) ShutdownProcessors

func (bps BuiltPipelines) ShutdownProcessors(ctx context.Context) error

func (BuiltPipelines) StartProcessors

func (bps BuiltPipelines) StartProcessors(ctx context.Context, host component.Host) error

type Exporters

type Exporters map[configmodels.Exporter]*builtExporter

Exporters is a map of exporters created from exporter configs.

func (Exporters) ShutdownAll

func (exps Exporters) ShutdownAll(ctx context.Context) error

ShutdownAll stops all exporters.

func (Exporters) StartAll

func (exps Exporters) StartAll(ctx context.Context, host component.Host) error

StartAll starts all exporters.

func (Exporters) ToMapByDataType

func (exps Exporters) ToMapByDataType() map[configmodels.DataType]map[configmodels.Exporter]component.Exporter

type ExportersBuilder

type ExportersBuilder struct {
	// contains filtered or unexported fields
}

ExportersBuilder builds exporters from config.

func NewExportersBuilder

func NewExportersBuilder(
	logger *zap.Logger,
	config *configmodels.Config,
	factories map[configmodels.Type]component.ExporterFactoryBase,
) *ExportersBuilder

NewExportersBuilder creates a new ExportersBuilder. Call BuildExporters() on the returned value.

func (*ExportersBuilder) Build

func (eb *ExportersBuilder) Build() (Exporters, error)

BuildExporters exporters from config.

type Extensions

type Extensions map[configmodels.Extension]*builtExtension

Exporters is a map of exporters created from exporter configs.

func (Extensions) NotifyPipelineNotReady

func (exts Extensions) NotifyPipelineNotReady() error

func (Extensions) NotifyPipelineReady

func (exts Extensions) NotifyPipelineReady() error

func (Extensions) ShutdownAll

func (exts Extensions) ShutdownAll(ctx context.Context) error

ShutdownAll stops all exporters.

func (Extensions) StartAll

func (exts Extensions) StartAll(ctx context.Context, host component.Host) error

StartAll starts all exporters.

func (Extensions) ToMap

func (exts Extensions) ToMap() map[configmodels.Extension]component.ServiceExtension

type ExtensionsBuilder

type ExtensionsBuilder struct {
	// contains filtered or unexported fields
}

ExportersBuilder builds exporters from config.

func NewExtensionsBuilder

func NewExtensionsBuilder(
	logger *zap.Logger,
	config *configmodels.Config,
	factories map[configmodels.Type]component.ExtensionFactory,
) *ExtensionsBuilder

NewExportersBuilder creates a new ExportersBuilder. Call BuildExporters() on the returned value.

func (*ExtensionsBuilder) Build

func (eb *ExtensionsBuilder) Build() (Extensions, error)

Build extensions from config.

type PipelinesBuilder

type PipelinesBuilder struct {
	// contains filtered or unexported fields
}

PipelinesBuilder builds pipelines from config.

func NewPipelinesBuilder

func NewPipelinesBuilder(
	logger *zap.Logger,
	config *configmodels.Config,
	exporters Exporters,
	factories map[configmodels.Type]component.ProcessorFactoryBase,
) *PipelinesBuilder

NewPipelinesBuilder creates a new PipelinesBuilder. Requires exporters to be already built via ExportersBuilder. Call BuildProcessors() on the returned value.

func (*PipelinesBuilder) Build

func (pb *PipelinesBuilder) Build() (BuiltPipelines, error)

BuildProcessors pipeline processors from config.

type Receivers

type Receivers map[configmodels.Receiver]*builtReceiver

Receivers is a map of receivers created from receiver configs.

func (Receivers) ShutdownAll

func (rcvs Receivers) ShutdownAll(ctx context.Context) error

StopAll stops all receivers.

func (Receivers) StartAll

func (rcvs Receivers) StartAll(ctx context.Context, host component.Host) error

StartAll starts all receivers.

type ReceiversBuilder

type ReceiversBuilder struct {
	// contains filtered or unexported fields
}

ReceiversBuilder builds receivers from config.

func NewReceiversBuilder

func NewReceiversBuilder(
	logger *zap.Logger,
	config *configmodels.Config,
	builtPipelines BuiltPipelines,
	factories map[configmodels.Type]component.ReceiverFactoryBase,
) *ReceiversBuilder

NewReceiversBuilder creates a new ReceiversBuilder. Call BuildProcessors() on the returned value.

func (*ReceiversBuilder) Build

func (rb *ReceiversBuilder) Build() (Receivers, error)

BuildProcessors receivers from config.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier