testhelper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestHTTPServer

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

TestHTTPServer is a http server for testing

func NewTestHTTPServer

func NewTestHTTPServer() *TestHTTPServer

NewTestHTTPServer creates a new TestHTTPServer

func (*TestHTTPServer) RegisterHandler

func (ts *TestHTTPServer) RegisterHandler(path string, h http.HandlerFunc)

RegisterHandler register a http handler

func (*TestHTTPServer) Start

func (ts *TestHTTPServer) Start()

Start starts the http server

func (*TestHTTPServer) Stop

func (ts *TestHTTPServer) Stop()

Stop stops the http server

func (*TestHTTPServer) URL

func (ts *TestHTTPServer) URL() string

URL returns the url of the http server

Jump to

Keyboard shortcuts

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