webserver

package
v0.0.0-...-83e654d Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebServer

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

WebServer is a struct representing a HTTP Server (using a net.Listener and a ServeMux multiplexer).

func New

func New(addr string) *WebServer

New returns a new WebServer.

func (*WebServer) GetAddr

func (ws *WebServer) GetAddr() string

GetAddr returns the address on which the WebServer is listening. It is a part of the service.endpoint interface.

func (*WebServer) Handle

func (ws *WebServer) Handle(prefix string, handler http.Handler)

Handle the given prefix using the given handler. It is a part of the service.endpoint interface.

func (*WebServer) Start

func (ws *WebServer) Start() (err error)

Start the WebServer (implementing service.startable interface).

func (*WebServer) Stop

func (ws *WebServer) Stop() (err error)

Stop the WebServer (implementing service.stopable interface).

Jump to

Keyboard shortcuts

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