INNER CODE UNIT · Go

basicAuth

cloudflare/alertmanager2es · main.go:62

func basicAuth(username, password string) string {
	auth := username + ":" + password
	return base64.StdEncoding.EncodeToString([]byte(auth))
}

func init() {
	prometheus.MustRegister(notificationsErrored)
	prometheus.MustRegister(notificationsInvalid)
	prometheus.MustRegister(notificationsReceived)
}

func main() {
	var showVersion bool
	flag.StringVar(&addr, "addr", addr, "host:port to listen to")
	flag.StringVar(&esIndexDateFormat, "esIndexDateFormat", esIndexDateFormat, "Elasticsearch index date format")
	flag.StringVar(&esIndexName, "esIndexName", esIndexName, "Elasticsearch index name")
	flag.StringVar(&esType, "esType", esType, "Elasticsearch document type ('_type')")
	flag.StringVar(&esURL, "esURL", esURL, "Elasticsearch HTTP URL")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…