build: Index | Files

package https

import ""

Package https contains helpers for starting an HTTPS server.


Package Files


func ListenAndServe Uses

func ListenAndServe(handler http.Handler, opt *Options) error

ListenAndServe serves the given handler by HTTPS (and HTTP, redirecting to HTTPS) using the provided options.

ListenAndServe always returns a non-nil error.

type Options Uses

type Options struct {
    // Addr specifies the host and port the server should listen on.
    Addr string

    // AutocertCacheBucket specifies the name of the GCS bucket for
    // Let’s Encrypt to use. If this is not specified, then HTTP traffic is
    // served on Addr.
    AutocertCacheBucket string

Options are the configuration parameters for the HTTP(S) server.

Package https imports 11 packages (graph) and is imported by 2 packages. Updated 2021-01-21. Refresh now. Tools for package owners.