Documentation
¶
Overview ¶
Package https contains helpers for starting an HTTP/HTTPS server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = &Options{}
Functions ¶
func ListenAndServe ¶
ListenAndServe runs the servers configured by DefaultOptions. It always returns a non-nil error.
func ListenAndServeOpts ¶
ListenAndServeOpts runs the servers configured by opts. It always returns a non-nil error.
func RegisterFlags ¶
RegisterFlags registers flags that control DefaultOptions, which will be used with ListenAndServe below. Typical usage is to call RegisterFlags at the beginning of main, then ListenAndServe at the end.
Types ¶
type Options ¶
type Options struct { // Specifies the ACME directory to use to retrieve certificates. AutocertDirectory string // Specifies the ACME external account binding token to use. This should be // a JSON-encoded acme.ExternalAccountBinding struct. AutocertEAB string // Specifies the GCS bucket to use with AutocertAddr. AutocertBucket string // If non-empty, listen on this address and serve HTTPS using a cert stored in AutocertBucket. AutocertAddr string // Specifies the email address to use when creating an ACME account. AutocertEmail string // If non-empty, listen on this address and serve HTTPS using a self-signed cert. SelfSignedAddr string // If non-empty, listen on this address and serve HTTP. HTTPAddr string // If non-empty, respond unconditionally with 200 OK to requests on this path. HealthPath string }
Click to show internal directories.
Click to hide internal directories.