generate

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SloNameArgument    = "--slo"
	SuccessObjArgument = "--success-target"
	LatencyMsArgument  = "--latency-ms"
	LatencyObjArgument = "--latency-target"
	NoDocArgument      = "--no-doc"

	AmPromPackage = "\"github.com/autometrics-dev/autometrics-go/prometheus/autometrics\""
	AmOtelPackage = "\"github.com/autometrics-dev/autometrics-go/otel/autometrics\""
)

Variables

This section is empty.

Functions

func GenerateDocumentationAndInstrumentation

func GenerateDocumentationAndInstrumentation(ctx internal.GeneratorContext, sourceCode, moduleName string) (string, error)

GenerateDocumentationAndInstrumentation takes the raw source code from a file and generates the documentation for the `//autometrics:inst` functions.

It returns the new source code with augmented documentation.

func TransformFile

func TransformFile(ctx internal.GeneratorContext, path, moduleName string) error

TransformFile takes a file path and generates the documentation for the `//autometrics:inst` functions.

It also replaces the file in place.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL