test

package
v0.0.0-...-ef6dcbe Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindGoModPath

func FindGoModPath(currentWorkDir string) (string, error)

FindGoModPath returns the go.mod file system path for the current project. If the file is not found an error will be returned.

func GetRelativeDependencyPath

func GetRelativeDependencyPath(dependency string) string

GetRelativeDependencyPath returns the relative system path for a given module. If the dependency is not found within the go.mod file and empty string is returned.

func GetRelativeDependencyPathWithError

func GetRelativeDependencyPathWithError(dependency string) (string, error)

GetRelativeDependencyPathWithError returns the relative system path for a given module. If the dependency is not found within the go.mod file or the file doesn't exist, an error will be returned.

func NewCounterReader

func NewCounterReader(opts prometheus.CounterOpts, labels []string) *strings.Reader

NewCounterReader generates a strings.Reader to be used by Prometheus' testutils. The Reader will contain the expected counter metric data generated by using the parameters passed to this function.

func NewHistogramReader

func NewHistogramReader(opts prometheus.HistogramOpts, labels []string, startTime, completionTime *metav1.Time) *strings.Reader

NewHistogramReader generates a strings.Reader to be used by Prometheus' testutils. The Reader will contain the expected histogram metric data generated by using the parameters passed to this function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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