util

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(list []string, s string) bool

ContainsString check if a slice contains a specific string

func JSONEncode

func JSONEncode(metrics []FakeMetric) (string, error)

JSONEncode encodes a FakeMetric into json string

func RemoveString

func RemoveString(list []string, s string) []string

RemoveString remove a specifici string from a slice

Types

type FakeMetric

type FakeMetric struct {
	Value        string            `json:"value"`
	MetricName   string            `json:"metricName"`
	MetricLabels map[string]string `json:"metricLabels"`
}

FakeMetric is used to define metrics to be exposed by the fake custom metrics server

Jump to

Keyboard shortcuts

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