server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher struct {
	IP            string
	Port          int
	Router        route.Router
	Translator    translate.MessageTranslator
	VarsProcessor vars.VarsProcessor
	Notifier      notify.Notifier
	Mlog          chan definition.Match
	Logs          chan string
}

Dispatcher is the mock http server

func (*Dispatcher) ServeHTTP

func (di *Dispatcher) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServerHTTP is the mock http server request handler. It uses the router to decide the matching mock and translator as adapter between the HTTP impelementation and the mock definition.

func (Dispatcher) Start

func (di Dispatcher) Start()

Start initialize the HTTP mock server

Jump to

Keyboard shortcuts

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