server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 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
	ResponseParser parse.ResponseParser
	BodyPersister  persist.BodyPersister
	MessageSender  amqp.Sender
	Mlog           chan definition.Match
}

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