package diag

import "github.com/zalando/skipper/filters/diag"

Package diag provides a set of network throttling filters for diagnostic purpose.

The filters enable adding artificial latency, limiting bandwidth or chunking responses with custom chunk size
and delay. This throttling can be applied to the proxy responses or to the outgoing backend requests. An
additional filter, randomContent, can be used to generate response with random text of specified length.

NewLatency creates a filter specification whose filter instances can be used
to add additional latency to responses. It expects the latency in milliseconds
as an argument. It always adds this value in addition to the natural latency,
and does not do any adjustments. Eskip example:

NewRandom creates a filter specification whose filter instances can be used
to respond to requests with random text of specified length. It expects the
the byte length of the random response to be generated as an argument.
Eskip example: