http

package
v1.12.3-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP struct {
	// contains filtered or unexported fields
}

HTTP is a HTTP server that can be used in integration tests.

func New

func New(t *testing.T, fopts ...Option) *HTTP

func (*HTTP) Cleanup

func (h *HTTP) Cleanup(t *testing.T)

func (*HTTP) Port

func (h *HTTP) Port() int

func (*HTTP) Run

func (h *HTTP) Run(t *testing.T, ctx context.Context)

type Option

type Option func(*options)

Option is a function that configures the process.

func WithHandler

func WithHandler(handler http.Handler) Option

func WithTLS

func WithTLS(t *testing.T, ca, cert, key []byte) Option

Jump to

Keyboard shortcuts

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