Skip to content

Commit 5884efd

Browse files
committed
Rename ValidateGraph to Validate for clarity.
Signed-off-by: sudipto baral <[email protected]>
1 parent 86a4a43 commit 5884efd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

otelcol/collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ func (col *Collector) DryRun(ctx context.Context) error {
276276
return err
277277
}
278278

279-
return service.ValidateGraph(ctx, service.Settings{
279+
return service.Validate(ctx, service.Settings{
280280
BuildInfo: col.set.BuildInfo,
281281
ReceiversConfigs: cfg.Receivers,
282282
ReceiversFactories: factories.Receivers,

service/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,8 @@ func ptr[T any](v T) *T {
538538
return &v
539539
}
540540

541-
// ValidateGraph verifies the graph by calling the internal graph.Build.
542-
func ValidateGraph(ctx context.Context, set Settings, cfg Config) error {
541+
// Validate verifies the graph by calling the internal graph.Build.
542+
func Validate(ctx context.Context, set Settings, cfg Config) error {
543543
tel := component.TelemetrySettings{
544544
Logger: zap.NewNop(),
545545
TracerProvider: nooptrace.NewTracerProvider(),

service/service_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ func TestValidateGraph(t *testing.T) {
897897
Pipelines: tc.pipelinesCfg,
898898
}
899899

900-
err := ValidateGraph(context.Background(), settings, cfg)
900+
err := Validate(context.Background(), settings, cfg)
901901
if tc.expectedError == "" {
902902
require.NoError(t, err)
903903
} else {

0 commit comments

Comments
 (0)