github.com/mholt/caddy-l4@v0.0.0-20241104153248-ec8fae209322/integration/caddyfile_adapt/gd_handler_throttle.caddytest (about)

     1  {
     2  	layer4 {
     3  		:80 {
     4  			route {
     5  				throttle {
     6  					read_bytes_per_second 100000
     7  					total_read_bytes_per_second 500000
     8  					read_burst_size 20000
     9  					total_read_burst_size 100000
    10  					latency 2s
    11  				}
    12  				proxy localhost:8080
    13  			}
    14  		}
    15  	}
    16  }
    17  ----------
    18  {
    19  	"apps": {
    20  		"layer4": {
    21  			"servers": {
    22  				"srv0": {
    23  					"listen": [
    24  						":80"
    25  					],
    26  					"routes": [
    27  						{
    28  							"handle": [
    29  								{
    30  									"handler": "throttle",
    31  									"latency": 2000000000,
    32  									"read_burst_size": 20000,
    33  									"read_bytes_per_second": 100000,
    34  									"total_read_burst_size": 100000,
    35  									"total_read_bytes_per_second": 500000
    36  								},
    37  								{
    38  									"handler": "proxy",
    39  									"upstreams": [
    40  										{
    41  											"dial": [
    42  												"localhost:8080"
    43  											]
    44  										}
    45  									]
    46  								}
    47  							]
    48  						}
    49  					]
    50  				}
    51  			}
    52  		}
    53  	}
    54  }