Documentation ¶
Index ¶
- func ApplyLibrdkafkaConf(config map[string]string, configMap *kafka.ConfigMap) error
- func BuildInstanceID() string
- func GetCounterValue(counter prometheus.Counter) (float64, error)
- func GetCounterVecValue(counterVec *prometheus.CounterVec, lvs ...string) (float64, error)
- func GetGaugeValue(gauge prometheus.Gauge) (float64, error)
- func GetGaugeVecValue(gaugeVec *prometheus.GaugeVec, lvs ...string) (float64, error)
- func GetIPAddress() (string, error)
- func RandString(n int) string
- type Condition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyLibrdkafkaConf ¶
ApplyLibrdkafkaConf overlays librdkafka config values from the provided firebolt config onto the consumer config; in the firebolt config these should be key prefixed with 'librdkafka.' and here we remove the prefix and pass 'em through https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md
func BuildInstanceID ¶
func BuildInstanceID() string
BuildInstanceID creates a unique ID for this instance of the running application by appending the host IP address and a random string.
func GetCounterValue ¶
func GetCounterValue(counter prometheus.Counter) (float64, error)
GetCounterValue fetches the current value of a prometheus counter. This is inherently racy and intended for test use only.
func GetCounterVecValue ¶
func GetCounterVecValue(counterVec *prometheus.CounterVec, lvs ...string) (float64, error)
GetCounterVecValue fetches the current value of a prometheus contervec for the passed label values. This is inherently racy and intended for test use only.
func GetGaugeValue ¶
func GetGaugeValue(gauge prometheus.Gauge) (float64, error)
GetGaugeValue fetches the current value of a prometheus gauge. This is inherently racy and intended for test use only.
func GetGaugeVecValue ¶
func GetGaugeVecValue(gaugeVec *prometheus.GaugeVec, lvs ...string) (float64, error)
GetGaugeVecValue fetches the current value of a prometheus gaugevec for the passed label values. This is inherently racy and intended for test use only.
func GetIPAddress ¶
GetIPAddress finds and returns the first non-loopback IP address formatted as a string.
func RandString ¶
RandString creates and returns a pseudorandom string from randAlphabet of length n.