Files
Alex BotenandGitHub abc772d56f [chore] remove unnecessary underscores (#9580)
As per feedback from my previous PR

Signed-off-by: Alex Boten <[email protected]>
2024-02-13 13:34:53 -08:00

34 lines
634 B
Go

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package testcomponents // import "go.opentelemetry.io/collector/service/internal/testcomponents"
import (
"context"
"go.opentelemetry.io/collector/component"
)
type componentState struct {
started bool
stopped bool
}
func (cs *componentState) Started() bool {
return cs.started
}
func (cs *componentState) Stopped() bool {
return cs.stopped
}
func (cs *componentState) Start(context.Context, component.Host) error {
cs.started = true
return nil
}
func (cs *componentState) Shutdown(context.Context) error {
cs.stopped = true
return nil
}