runhttp

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Unlicense Imports: 10 Imported by: 1

README

runhttp

Go Reference

Opinionated Go HTTP Server run helper(s).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RobotsDisallowAll

func RobotsDisallowAll(w http.ResponseWriter, r *http.Request)

RobotsDisallowAll is an http.HandlerFunc to serve disallow-all robots.txt.

func RunServer

func RunServer(ctx context.Context, srv *http.Server, crtCfg *AutocertConfig) error

RunServer runs the provided lightly-configured server (Addr + Handler), augmenting it with sane defaults, until SIGTERM is received.

Types

type AutocertConfig

type AutocertConfig struct {
	Domain   string
	CacheDir string
}

AutocertConfig holds basic autocert.Manager config.

Jump to

Keyboard shortcuts

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