Back to godoc.org
golang.org/x/build/internal/https

package https

v0.0.0 (6b5029f)
Latest Go to latest
Published: 1 day ago | License: BSD-3-Clause | Module: golang.org/x/build

Overview

Package https contains helpers for starting an HTTPS server.

Index

func ListenAndServe

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

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier