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

     1  {
     2  	layer4 {
     3  		:443 {
     4  			@a postgres
     5  			route @a {
     6  				proxy postgres.machine.local:443
     7  			}
     8  			route {
     9  				proxy fallback.machine.local:443
    10  			}
    11  		}
    12  	}
    13  }
    14  ----------
    15  {
    16  	"apps": {
    17  		"layer4": {
    18  			"servers": {
    19  				"srv0": {
    20  					"listen": [
    21  						":443"
    22  					],
    23  					"routes": [
    24  						{
    25  							"match": [
    26  								{
    27  									"postgres": {}
    28  								}
    29  							],
    30  							"handle": [
    31  								{
    32  									"handler": "proxy",
    33  									"upstreams": [
    34  										{
    35  											"dial": [
    36  												"postgres.machine.local:443"
    37  											]
    38  										}
    39  									]
    40  								}
    41  							]
    42  						},
    43  						{
    44  							"handle": [
    45  								{
    46  									"handler": "proxy",
    47  									"upstreams": [
    48  										{
    49  											"dial": [
    50  												"fallback.machine.local:443"
    51  											]
    52  										}
    53  									]
    54  								}
    55  							]
    56  						}
    57  					]
    58  				}
    59  			}
    60  		}
    61  	}
    62  }