func main() {
	// Serve 200 status on / for k8s health checks
	http.HandleFunc("/", handleRoot)

	// Serve 200 status on /healthz for k8s health checks
	http.HandleFunc("/healthz", handleHealthz)

	// Return the GameServerStatus of the allocated replica to the authorized client
	http.HandleFunc("/address", getOnly(basicAuth(handleAddress)))

	// Run the HTTP server using the bound certificate and key for TLS
	if err := http.ListenAndServeTLS(":8000", "/home/service/certs/tls.crt", "/home/service/certs/tls.key", nil); err != nil {
		logger.WithError(err).Fatal("HTTPS server failed to run")
	} else {
		logger.Info("HTTPS server is running on port 8000")
	}
}
// Main will set up an http server and three endpoints
Main will set up an http server and three endpoints
// Main will set up an http server and three endpoints
func main() {
	http.HandleFunc("/", handleRoot)
	http.HandleFunc("/healthz", handleHealthz)
	http.HandleFunc("/address", getOnly(basicAuth(handleAddress)))
	if err := http.ListenAndServeTLS(":8000", "/home/service/certs/tls.crt", "/home/service/certs/tls.key", nil); err != nil {
		logger.WithError(err).Fatal("HTTPS server failed to run")
	} else {
		logger.Info("HTTPS server is running on port 8000")
	}
}
func main ( ) { http . HandleFunc ( " " , handleRoot ) http . HandleFunc ( " " , handleHealthz ) http . HandleFunc ( " " , getOnly ( basicAuth ( handleAddress ) ) ) if err := http . ListenAndServeTLS ( " " , " " , " " , nil ) ; err != nil { logger . WithError ( err ) . Fatal ( " " ) } else { logger . Info ( " " ) } }
Main will set up an http server and three endpoints
Main will set up an http server and three endpoints
// Serve 200 status on / for k8s health checks // Serve 200 status on /healthz for k8s health checks // Return the GameServerStatus of the allocated replica to the authorized client // Run the HTTP server using the bound certificate and key for TLS