Debian Codegraph @

connector/internal/factory.go

raw
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 package internal // import "go.opentelemetry.io/collector/connector/internal"
5
6 import (
7 "fmt"
8
9 "go.opentelemetry.io/collector/component"
10 "go.opentelemetry.io/collector/pipeline"
11 )
12
13 func ErrDataTypes(id component.ID, from, to pipeline.Signal) error {
14 return fmt.Errorf("connector %q cannot connect from %s to %s: %w", id, from, to, pipeline.ErrSignalNotSupported)
15 }
16
17 func ErrIDMismatch(id component.ID, typ component.Type) error {
18 return fmt.Errorf("component type mismatch: component ID %q does not have type %q", id, typ)
19 }