https

package
v0.0.0-...-16694d9 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Go Reference

golang.org/x/build/internal/https

Package https contains helpers for starting an HTTPS server.

Documentation

Overview

Package https contains helpers for starting an HTTPS server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Types

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.

Jump to

Keyboard shortcuts

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