martianhttp

package
v0.0.0-...-c724f24 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package martianhttp provides HTTP handlers for managing the state of a martian.Proxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Modifier

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

Modifier is a locking modifier that is configured via http.Handler.

func NewModifier

func NewModifier() *Modifier

NewModifier returns a new martianhttp.Modifier.

func (*Modifier) ModifyRequest

func (m *Modifier) ModifyRequest(ctx *martian.Context, req *http.Request) error

ModifyRequest runs reqmod.

func (*Modifier) ModifyResponse

func (m *Modifier) ModifyResponse(ctx *martian.Context, res *http.Response) error

ModifyResponse runs resmod.

func (*Modifier) ResetRequestVerifications

func (m *Modifier) ResetRequestVerifications()

ResetRequestVerifications resets verifications on reqmod, iff reqmod is a RequestVerifier.

func (*Modifier) ResetResponseVerifications

func (m *Modifier) ResetResponseVerifications()

ResetResponseVerifications resets verifications on resdmo, iff resmod is a ResponseVerifier.

func (*Modifier) ServeHTTP

func (m *Modifier) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP accepts a POST request with a body containing a modifier as a JSON message and updates the contained reqmod and resmod with the parsed modifier.

func (*Modifier) VerifyRequests

func (m *Modifier) VerifyRequests() error

VerifyRequests verifies reqmod, iff reqmod is a RequestVerifier.

func (*Modifier) VerifyResponses

func (m *Modifier) VerifyResponses() error

VerifyResponses verifies resmod, iff resmod is a ResponseVerifier.

Jump to

Keyboard shortcuts

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