generate

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

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

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

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:doc` 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:doc` 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