diff options
| author | Shulhan <ms@kilabit.info> | 2021-03-21 18:34:30 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-03-21 18:34:30 +0700 |
| commit | 5828835bcd18eff070789fd82401480c244bbc27 (patch) | |
| tree | 0b030e1f037684a9f5e81d62d8db52dd6ce69532 /example/example.go | |
| parent | ab00b51a1353c7f17697e027061b4c20509a7a80 (diff) | |
| download | gorankusu-5828835bcd18eff070789fd82401480c244bbc27.tar.xz | |
all: load pass attack results and implement function to get attack result
When the service started, it will load all previous attack results
from directory Environment.ResultsDir.
It will only scan the file name and append it to HttpTarget.Results
due to the size and time to load one of them can take time.
Through the web interface, user can click "Show" button to load
the result and display it on the screen.
Diffstat (limited to 'example/example.go')
| -rw-r--r-- | example/example.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/example/example.go b/example/example.go index c49400e..190b39a 100644 --- a/example/example.go +++ b/example/example.go @@ -32,7 +32,7 @@ type Example struct { // func New() (ex *Example, err error) { env := &trunks.Environment{ - ResultsDir: "testdata/example/", + ResultsDir: "example/testdata/", ResultsSuffix: "example", } @@ -92,7 +92,7 @@ func (ex *Example) registerEndpoints() (err error) { func (ex *Example) registerTargets() (err error) { targetHttp := &trunks.Target{ - Name: "Example HTTP target", + Name: "Example", Opts: &trunks.AttackOptions{ BaseUrl: fmt.Sprintf("http://%s", ex.trunks.Env.ListenAddress), Duration: 5 * time.Second, |
