https

package
v0.0.0-...-06c6e23 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package https provides a helper function to set up an HTTPS server derived from the current environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(ready chan<- struct{}, serverName string)

ListenAndServe serves the http.DefaultServeMux by HTTPS (and HTTP, redirecting to HTTPS), configured using the server command line flags.

If running on GCE and the -letscache flag is *not* specified, ListenAndServe will configure a Let's Encrypt cache that stores its data in the Cloud Storage bucket specified by the "letsencrypt-bucket" instance attribute in the Compute Engine Metadata server.

The given channel, if any, is closed when the TCP listener has succeeded. It may be used to signal that the server is ready to start serving requests.

ListenAndServe does not return. It exits the program when the server is shut down (via SIGTERM or due to an error) and calls shutdown.Shutdown.

Types

This section is empty.

Jump to

Keyboard shortcuts

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