Skip to content

Commit

Permalink
setupConfigurationComponents delete pkg level comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitpatel96 committed May 20, 2024
1 parent d0b056b commit c632913
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions otelcol/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
// Package otelcol handles the command-line, configuration, and runs the OpenTelemetry Collector.
// It contains the main [Collector] struct and its constructor [NewCollector].
// [Collector.Run] starts the collector and then blocks until it shuts down.
// Collector.setupConfigurationComponents is the "main" function responsible for startup - it orchestrates the loading of the
// configuration, the creation of the graph, and the starting of all the components.
package otelcol // import "go.opentelemetry.io/collector/otelcol"

import (
Expand Down Expand Up @@ -160,7 +158,7 @@ func (col *Collector) Shutdown() {
}
}

// setupConfigurationComponents loads the config and starts the components. If all the steps succeeds it
// setupConfigurationComponents loads the config, creates the graph, and starts the components. If all the steps succeeds it
// sets the col.service with the service currently running.
func (col *Collector) setupConfigurationComponents(ctx context.Context) error {
col.setCollectorState(StateStarting)
Expand Down Expand Up @@ -252,6 +250,7 @@ func (col *Collector) DryRun(ctx context.Context) error {
// Run starts the collector according to the given configuration, and waits for it to complete.
// Consecutive calls to Run are not allowed, Run shouldn't be called once a collector is shut down.
func (col *Collector) Run(ctx context.Context) error {
// setupConfigurationComponents is the "main" function responsible for startup
if err := col.setupConfigurationComponents(ctx); err != nil {
col.setCollectorState(StateClosed)
return err
Expand Down

0 comments on commit c632913

Please sign in to comment.