# g-h-0-s-t/hulk architecture

> Architecture diagram of the GitHub repository g-h-0-s-t/hulk, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/g-h-0-s-t/hulk
- Repository: https://github.com/g-h-0-s-t/hulk

## Overview

HULK is a command-line HTTP load-testing tool. Its primary workflow parses target and request options, starts a bounded pool of goroutines, repeatedly constructs and sends GET or POST requests with randomized query data and headers, then reports outcomes and can stop in safe mode after a server error response. The Go implementation is concentrated in hulk.go; the Python port is a separate legacy implementation. The graph focuses on the documented Go runtime; the source does not expose separate domain modules or a persistent store.

Main entry points: [`hulk.go`](https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go) (Options and launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and control"]
  node_main["Options and launcher<br/>[hulk.go]"]
end

subgraph group_traffic["Request generation"]
  node_worker["HTTP worker<br/>[hulk.go]"]
  node_request["Request builder<br/>[hulk.go]"]
  node_random["Random query and headers<br/>[hulk.go]"]
  node_http["HTTP client<br/>[hulk.go]"]
end

subgraph group_runtime["Concurrency and reporting"]
  node_pool["Goroutine pool<br/>[hulk.go]"]
  node_status["Outcome and stop logic<br/>[hulk.go]"]
  node_console["Progress output<br/>[hulk.go]"]
end

node_operator(("Operator"))
node_target(("Target server"))
node_signals(("OS signals"))
node_agentfile["User-agent file"]
node_python["Python port<br/>[hulk.py]"]

node_operator -->|"sets options"| node_main
node_main -.->|"reads agents"| node_agentfile
node_main -->|"starts workers"| node_pool
node_pool -->|"launches"| node_worker
node_worker -->|"builds requests"| node_request
node_request -->|"uses values"| node_random
node_worker -->|"sends request"| node_http
node_http -->|"HTTP traffic"| node_target
node_http -->|"reports result"| node_status
node_status -->|"adjusts pool"| node_pool
node_status -->|"reports progress"| node_console
node_operator -->|"interrupts"| node_signals
node_signals -->|"notifies"| node_main

click node_main "https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go"
click node_pool "https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go"
click node_worker "https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go"
click node_request "https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go"
click node_random "https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go"
click node_http "https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go"
click node_status "https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go"
click node_console "https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go"
click node_python "https://github.com/g-h-0-s-t/hulk/blob/master/hulk.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_agentfile toneBlue
class node_worker,node_request,node_random,node_http toneAmber
class node_pool,node_status,node_console,node_target toneMint
class node_operator,node_signals toneIndigo
class node_python toneTeal
```

## Components

### CLI and control

- [Options and launcher](https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go): `hulk.go`

### Request generation

- [HTTP worker](https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go): `hulk.go`
- [Request builder](https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go): `hulk.go`
- [Random query and headers](https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go): `hulk.go`
- [HTTP client](https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go): `hulk.go`

### Concurrency and reporting

- [Goroutine pool](https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go): `hulk.go`
- [Outcome and stop logic](https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go): `hulk.go`
- [Progress output](https://github.com/g-h-0-s-t/hulk/blob/master/hulk.go): `hulk.go`

### Other components

- **Operator**
- **Target server**
- **OS signals**
- **User-agent file**
- [Python port](https://github.com/g-h-0-s-t/hulk/blob/master/hulk.py): `hulk.py`

## Connections

- Operator → Options and launcher: sets options
- Options and launcher → User-agent file: reads agents
- Options and launcher → Goroutine pool: starts workers
- Goroutine pool → HTTP worker: launches
- HTTP worker → Request builder: builds requests
- Request builder → Random query and headers: uses values
- HTTP worker → HTTP client: sends request
- HTTP client → Target server: HTTP traffic
- HTTP client → Outcome and stop logic: reports result
- Outcome and stop logic → Goroutine pool: adjusts pool
- Outcome and stop logic → Progress output: reports progress
- Operator → OS signals: interrupts
- OS signals → Options and launcher: notifies
