Documentation ¶
Index ¶
- func FindGoModPath(currentWorkDir string) (string, error)
- func GetRelativeDependencyPath(dependency string) string
- func GetRelativeDependencyPathWithError(dependency string) (string, error)
- func NewCounterReader(opts prometheus.CounterOpts, labels []string) *strings.Reader
- func NewHistogramReader(opts prometheus.HistogramOpts, labels []string, ...) *strings.Reader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindGoModPath ¶
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 ¶
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 ¶
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.