Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flaw ¶
type Flaw interface { Middleware(w http.ResponseWriter, r *http.Request) FlawResult Name() string }
type FlawMiddleware ¶
func Of ¶
func Of(flaw Flaw, runOption RunOption) FlawMiddleware
func (FlawMiddleware) Middleware ¶
func (f FlawMiddleware) Middleware(next http.Handler) http.Handler
type HttpStatusCodeFlaw ¶
type HttpStatusCodeFlaw struct {
Status int
}
func NewHttpStatusCode ¶
func NewHttpStatusCode(status int) HttpStatusCodeFlaw
func (HttpStatusCodeFlaw) Middleware ¶
func (l HttpStatusCodeFlaw) Middleware(w http.ResponseWriter, r *http.Request) FlawResult
func (HttpStatusCodeFlaw) Name ¶
func (l HttpStatusCodeFlaw) Name() string
type LatencyFlaw ¶
func NewFixedLatency ¶
func NewFixedLatency(value int) LatencyFlaw
func NewRandomLatency ¶
func NewRandomLatency(min int, max int) LatencyFlaw
func (LatencyFlaw) Middleware ¶
func (l LatencyFlaw) Middleware(w http.ResponseWriter, r *http.Request) FlawResult
func (LatencyFlaw) Name ¶
func (l LatencyFlaw) Name() string
Click to show internal directories.
Click to hide internal directories.