inmemhttp

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package inmemhttp implements temporary HTTP server which is based off memory fs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server interface {
	AddFile(filename string, contents []byte) error
	AddHandler(pattern string, handler http.Handler)

	GetAddr() net.Addr
	Serve()
	Shutdown(ctx context.Context) error
}

Server is an in-memory http web server.

func NewServer

func NewServer(address string) (Server, error)

NewServer creates in-mem HTTP server.

Jump to

Keyboard shortcuts

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