Add random delay and errors middleware

This commit is contained in:
Stefan Prodan
2018-08-21 03:12:20 +03:00
parent 0f098cf0f1
commit 593ccaa0cd
4 changed files with 39 additions and 2 deletions
+2
View File
@@ -32,6 +32,8 @@ func main() {
fs.String("ui-path", "./ui", "UI local path")
fs.String("ui-color", "blue", "UI color")
fs.String("ui-message", fmt.Sprintf("greetings from podinfo v%v", version.VERSION), "UI message")
fs.Bool("random-delay", false, "between 0 and 5 seconds random delay")
fs.Bool("random-error", false, "1/3 chances of a random response error")
fs.Int("stress-cpu", 0, "Number of CPU cores with 100 load")
fs.Int("stress-memory", 0, "MB of data to load into memory")
versionFlag := fs.Bool("version", false, "get version number")