Documentation
¶
Overview ¶
Package faultbuild builds the faults of package github.com/caffeine-projects/vlatte/fault from the fault specs of mock files: an object whose type names the fault and whose other keys are its parameters, such as {"type": "latency", "delay": {"type": "jitter", "latency": "300ms", "jitter": "60ms"}}. Each fault describes itself as the spec that builds it again.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
Build builds the fault a spec of a mock file describes: an object whose type names the fault, and whose other keys are its parameters. Durations are whole milliseconds, or a Go duration such as "1.5s", from 0. The types, after the functions of package fault, and their parameters:
empty_response
malformed_response_chunk
random_data_then_close
connection_reset_by_peer
chunked_dribble_delay chunks, total
latency delay (duration or typed delay distribution)
bandwidth rate: bytes per second, or gprs, dial_up, 2g, good_2g, 3g, good_3g, dsl, 4g,
wifi or fiber, the Bandwidth constants of package fault
slicer average_size, size_variation (0 by default), delay (0 by default)
slow_close delay
timeout after (0 by default)
limit_data bytes
connection_reset_by_peer_after after
A spec with problems, such as a missing parameter, a key the fault doesn't take, or a value its function of package fault would panic on, fails with an error that lists each, keyed as in fault.delay.
Types ¶
This section is empty.