memhttptest

package
v0.0.0-...-a04e50b Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(tb testing.TB, handler http.Handler, opts ...memhttp.Option) *memhttp.Server

NewServer constructs a memhttp.Server with defaults suitable for tests: it logs runtime errors to the provided testing.TB, and it automatically shuts down the server when the test completes. Startup and shutdown errors fail the test.

To customize the server, use any memhttp.Option. In particular, it may be necessary to customize the shutdown timeout with memhttp.WithCleanupTimeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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