fakeserver

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fakeserver added in v1.16.0

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

Fakeserver represents a HTTP server with objects to hold and return

func NewFakeServer

func NewFakeServer(iPort int, iObjects map[string]map[string]interface{}, iStart bool, iDebug bool, dir string) *Fakeserver

NewFakeServer creates a HTTP server used for tests and debugging

func (*Fakeserver) GetServer added in v1.16.0

func (svr *Fakeserver) GetServer() *http.Server

GetServer returns the server object itself

func (*Fakeserver) Running added in v1.16.0

func (svr *Fakeserver) Running() bool

Running returns whether the server is running

func (*Fakeserver) Shutdown added in v1.16.0

func (svr *Fakeserver) Shutdown()

Shutdown closes the server

func (*Fakeserver) StartInBackground added in v1.16.0

func (svr *Fakeserver) StartInBackground()

StartInBackground starts the HTTP server in the background

Jump to

Keyboard shortcuts

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