symptom

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPDelaySymptom added in v0.0.3

type HTTPDelaySymptom struct {
	RequestDelay  int `required:"false" mapstructure:"request_delay"`
	ResponseDelay int `required:"false" mapstructure:"response_delay"`
	Delay         int `required:"false" mapstructure:"delay"`
}

HTTPDelaySymptom adds specified delays to requests Symptom Update docs: these values should be in ms

func (HTTPDelaySymptom) HandleEvent added in v0.0.3

func (m HTTPDelaySymptom) HandleEvent(e muxy.ProxyEvent, ctx *muxy.Context)

HandleEvent takes a proxy event for the proxy to intercept and modify

func (*HTTPDelaySymptom) Muck added in v0.0.3

func (m *HTTPDelaySymptom) Muck(ctx *muxy.Context, wait int)

Muck injects chaos into the system

func (HTTPDelaySymptom) Setup added in v0.0.3

func (m HTTPDelaySymptom) Setup()

Setup sets up the delay plugin

func (HTTPDelaySymptom) Teardown added in v0.0.3

func (m HTTPDelaySymptom) Teardown()

Teardown shuts down the plugin

type HTTPTampererSymptom added in v0.0.3

type HTTPTampererSymptom struct {
	Request  RequestConfig
	Response ResponseConfig
}

HTTPTampererSymptom is a plugin to mess with request/responses between a consumer and provider system

func (*HTTPTampererSymptom) HandleEvent added in v0.0.3

func (m *HTTPTampererSymptom) HandleEvent(e muxy.ProxyEvent, ctx *muxy.Context)

HandleEvent is a hook to allow the plugin to intervene with a request/response event

func (*HTTPTampererSymptom) MuckRequest added in v0.0.3

func (m *HTTPTampererSymptom) MuckRequest(ctx *muxy.Context)

MuckRequest adds chaos to the request

func (*HTTPTampererSymptom) MuckResponse added in v0.0.3

func (m *HTTPTampererSymptom) MuckResponse(ctx *muxy.Context)

MuckResponse adds chaos to the response

func (HTTPTampererSymptom) Setup added in v0.0.3

func (m HTTPTampererSymptom) Setup()

Setup sets up the plugin

func (HTTPTampererSymptom) Teardown added in v0.0.3

func (m HTTPTampererSymptom) Teardown()

Teardown shuts down the plugin

type RequestConfig

type RequestConfig struct {
	Method  string
	Headers map[string]string
	Cookies []http.Cookie
	Body    string
	Path    string
	Host    string
}

RequestConfig contains details of the HTTP request to tamper with prior to sending on to the target system

type ResponseConfig

type ResponseConfig struct {
	Headers map[string]string
	Cookies []http.Cookie
	Body    string
	Status  int
}

ResponseConfig contains details of the HTTP response to tamper with prior to sending on to the initiating system

type ShittyNetworkSymptom

type ShittyNetworkSymptom struct {
	Device           string
	Latency          int      `default:"-1"`
	TargetBandwidth  int      `mapstructure:"target_bw" default:"-1"`
	DefaultBandwidth int      `mapstructure:"default_bw" default:"-1"`
	PacketLoss       float64  `mapstructure:"packet_loss"`
	TargetIps        []string `mapstructure:"target_ips"`
	TargetIps6       []string `mapstructure:"target_ips6"`
	TargetPorts      []string `mapstructure:"target_ports"`
	TargetProtos     []string `mapstructure:"target_protos" required:"true" default:"tcp,icmp,udp"`
	// contains filtered or unexported fields
}

ShittyNetworkSymptom allows you to modify the network speed on a host e.g. shape bandwidth to mobile, slower speeds

func (ShittyNetworkSymptom) HandleEvent

func (s ShittyNetworkSymptom) HandleEvent(e muxy.ProxyEvent, ctx *muxy.Context)

HandleEvent is the hook into the event system

func (*ShittyNetworkSymptom) Muck

func (s *ShittyNetworkSymptom) Muck(ctx *muxy.Context)

Muck is where the plugin can do any context-specific chaos

func (*ShittyNetworkSymptom) Setup

func (s *ShittyNetworkSymptom) Setup()

Setup sets up the plugin

func (*ShittyNetworkSymptom) Teardown

func (s *ShittyNetworkSymptom) Teardown()

Teardown shuts down the plugin

type TCPRequestConfig added in v0.0.3

type TCPRequestConfig struct {
	// Body fixes the request message
	Body string

	// Randomize request message
	Randomize bool

	// Truncate the request message. Removes trailing char
	Truncate bool
}

TCPRequestConfig contains details of the HTTP request to tamper with prior to sending on to the target system

type TCPResponseConfig added in v0.0.3

type TCPResponseConfig struct {
	// Body fixes the response message
	Body string

	// Randomize response message
	Randomize bool

	// Truncate the response message. Removes trailing char
	Truncate bool
}

TCPResponseConfig contains details of the TCP response to tamper with prior to sending on to the initiating system

type TCPTampererSymptom added in v0.0.3

type TCPTampererSymptom struct {
	Request  TCPRequestConfig
	Response TCPResponseConfig
}

TCPTampererSymptom is a plugin to mess with request/responses between a consumer and provider system

func (*TCPTampererSymptom) HandleEvent added in v0.0.3

func (m *TCPTampererSymptom) HandleEvent(e muxy.ProxyEvent, ctx *muxy.Context)

HandleEvent is a hook to allow the plugin to intervene with a request/response event

func (*TCPTampererSymptom) MuckRequest added in v0.0.3

func (m *TCPTampererSymptom) MuckRequest(ctx *muxy.Context)

MuckRequest adds chaos to the request

func (*TCPTampererSymptom) MuckResponse added in v0.0.3

func (m *TCPTampererSymptom) MuckResponse(ctx *muxy.Context)

MuckResponse adds chaos to the response

func (TCPTampererSymptom) Setup added in v0.0.3

func (m TCPTampererSymptom) Setup()

Setup sets up the plugin

func (TCPTampererSymptom) Teardown added in v0.0.3

func (m TCPTampererSymptom) Teardown()

Teardown shuts down the plugin

Jump to

Keyboard shortcuts

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