symptom

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_DELAY = 2 * time.Second

Variables

This section is empty.

Functions

func ParsePorts

func ParsePorts(ports string) []string

Types

type HttpDelaySymptom

type HttpDelaySymptom struct {
	Delay int `required:"true" default:"2"`
}

func (HttpDelaySymptom) HandleEvent

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

func (*HttpDelaySymptom) Muck

func (h *HttpDelaySymptom) Muck(ctx *muxy.Context)

func (HttpDelaySymptom) Setup

func (m HttpDelaySymptom) Setup()

func (HttpDelaySymptom) Teardown

func (m HttpDelaySymptom) Teardown()

type HttpTampererSymptom

type HttpTampererSymptom struct {
	Request  RequestConfig
	Response ResponseConfig
}

func (*HttpTampererSymptom) HandleEvent

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

func (*HttpTampererSymptom) MuckRequest

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

func (*HttpTampererSymptom) MuckResponse

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

func (HttpTampererSymptom) Setup

func (m HttpTampererSymptom) Setup()

func (HttpTampererSymptom) Teardown

func (m HttpTampererSymptom) Teardown()

type RequestConfig

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

type ResponseConfig

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

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
}

Shape bandwidth to mobile, slower speeds

func (ShittyNetworkSymptom) HandleEvent

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

func (*ShittyNetworkSymptom) Muck

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

func (*ShittyNetworkSymptom) Setup

func (s *ShittyNetworkSymptom) Setup()

func (*ShittyNetworkSymptom) Teardown

func (s *ShittyNetworkSymptom) Teardown()

Jump to

Keyboard shortcuts

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