Documentation
¶
Index ¶
- Variables
- func CreateTempFile(t *testing.T) *os.File
- func GetFreePort(t *testing.T) string
- func GetLogger(t *testing.T) zap.SugaredLogger
- func GetPrometheusCounter(t *testing.T, metricsEndpoint, metricName string) float64
- func GetPrometheusMetric(t *testing.T, metricsEndpoint, metricName string) pcm.MetricFamily
- func GetPrometheusMetrics(t *testing.T, metricsEndpoint string) map[string]pcm.MetricFamily
- func StartCollector(t *testing.T, logger zap.SugaredLogger, executable, configFileName string, ...) *exec.Cmd
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// LogLevel is used to set the level for the zap logger.
LogLevel = getStringEnv("LOG_LEVEL", "info")
)
Functions ¶
func CreateTempFile ¶
CreateTempFile creates a temp file.
func GetLogger ¶
func GetLogger(t *testing.T) zap.SugaredLogger
GetLogger returns a Zap Sugared logger.
func GetPrometheusCounter ¶
GetPrometheusCounter returns the counter named from the specified endpoint.
func GetPrometheusMetric ¶
func GetPrometheusMetric(t *testing.T, metricsEndpoint, metricName string) pcm.MetricFamily
GetPrometheusMetric returns the metric named from the specified endpoint.
func GetPrometheusMetrics ¶
GetPrometheusMetrics returns all metrics from the specified endpoint.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.