Back to godoc.org
go.opentelemetry.io/collector/component/componentdocs

package componentdocs

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

Overview

Package componenttest define types and functions used to help test packages implementing the component package interfaces.

Index

func VerifyComponentDocumentation

func VerifyComponentDocumentation(projectPath string, relativeDefaultComponentsPath string, projectGoModule string) error

VerifyComponentDocumentation returns an error if README.md for at least one enabled component is missing. "projectPath" is the absolute path to the root of the project to which the components belong. "defaultComponentsFilePath" is the path to the file that contains imports to all required components, "goModule" is the Go module to which the imports belong. This method is intended to be used only to verify documentation in Opentelemetry core and contrib repositories. Examples, 1) Usage in the core repo: componenttest.VerifyComponentDocumentation(

		"path/to/project",
		"service/defaultcomponents/defaults.go",
     "go.opentelemetry.io/collector",
	)

2) Usage in the contrib repo: componenttest.VerifyComponentDocumentation(

		"path/to/project",
		"cmd/otelcontrib/components.go",
     "github.com/open-telemetry/opentelemetry-collector-contrib",
	).
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier