Documentation improvements

This commit is contained in:
Thorhallur Sverrisson 2015-09-23 02:11:46 +00:00
parent a07e395181
commit c263560401

View file

@ -254,83 +254,109 @@ $ curl -s "http://localhost:8080/health" | jq .
} }
``` ```
* ```/api```: ```GET``` or ```PUT``` a configuration * ```/api```: ```GET``` configuration for all providers
```sh ```sh
$ curl -s "http://localhost:8082/api" | jq . $ curl -s "http://localhost:8082/api" | jq .
{ {
"Frontends": { "file": {
"frontend-traefik": { "Frontends": {
"Routes": { "frontend-traefik": {
"route-host-traefik": { "Routes": {
"Value": "traefik.docker.localhost", "route-host-traefik": {
"Rule": "Host" "Value": "traefik.docker.localhost",
} "Rule": "Host"
}
},
"Backend": "backend-test2"
}, },
"Backend": "backend-test2" "frontend-test": {
"Routes": {
"route-host-test": {
"Value": "test.docker.localhost",
"Rule": "Host"
}
},
"Backend": "backend-test1"
}
}, },
"frontend-test": { "Backends": {
"Routes": { "backend-test2": {
"route-host-test": { "Servers": {
"Value": "test.docker.localhost", "server-stoic_brattain": {
"Rule": "Host" "Weight": 0,
"Url": "http://172.17.0.8:80"
},
"server-jovial_khorana": {
"Weight": 0,
"Url": "http://172.17.0.12:80"
},
"server-jovial_franklin": {
"Weight": 0,
"Url": "http://172.17.0.11:80"
},
"server-elegant_panini": {
"Weight": 0,
"Url": "http://172.17.0.9:80"
},
"server-adoring_elion": {
"Weight": 0,
"Url": "http://172.17.0.10:80"
}
} }
}, },
"Backend": "backend-test1" "backend-test1": {
"Servers": {
"server-trusting_wozniak": {
"Weight": 0,
"Url": "http://172.17.0.5:80"
},
"server-sharp_jang": {
"Weight": 0,
"Url": "http://172.17.0.7:80"
},
"server-dreamy_feynman": {
"Weight": 0,
"Url": "http://172.17.0.6:80"
}
}
}
} }
}, },
"Backends": { "marathon": {
"backend-test2": { "Frontends": {
"Servers": { "frontend-marathon": {
"server-stoic_brattain": { "Routes": {
"Weight": 0, "route-host-marathon": {
"Url": "http://172.17.0.8:80" "Value": "marathon.docker.localhost",
"Rule": "Host"
}
}, },
"server-jovial_khorana": { "Backend": "backend-marathon"
"Weight": 0, },
"Url": "http://172.17.0.12:80"
},
"server-jovial_franklin": {
"Weight": 0,
"Url": "http://172.17.0.11:80"
},
"server-elegant_panini": {
"Weight": 0,
"Url": "http://172.17.0.9:80"
},
"server-adoring_elion": {
"Weight": 0,
"Url": "http://172.17.0.10:80"
}
}
}, },
"backend-test1": { "Backends": {
"Servers": { "backend-marathon": {
"server-trusting_wozniak": { "Servers": {
"Weight": 0, "server-marathon-1": {
"Url": "http://172.17.0.5:80" "Weight": 0,
"Url": "http://172.17.0.8:802"
},
}, },
"server-sharp_jang": { },
"Weight": 0, },
"Url": "http://172.17.0.7:80" },
},
"server-dreamy_feynman": {
"Weight": 0,
"Url": "http://172.17.0.6:80"
}
}
}
}
} }
``` ```
* ```/api/backends```: ```GET``` backends * ```/api/{provider}```: ```GET``` or ```PUT``` provider
* ```/api/backends/{backend}```: ```GET``` a backend * ```/api/{provider}/backends```: ```GET``` backends
* ```/api/backends/{backend}/servers```: ```GET``` servers in a backend * ```/api/{provider}/backends/{backend}```: ```GET``` a backend
* ```/api/backends/{backend}/servers/{server}```: ```GET``` a server in a backend * ```/api/{provider}/backends/{backend}/servers```: ```GET``` servers in a backend
* ```/api/frontends```: ```GET``` frontends * ```/api/{provider}/backends/{backend}/servers/{server}```: ```GET``` a server in a backend
* ```/api/frontends/{frontend}```: ```GET``` a frontend * ```/api/{provider}/frontends```: ```GET``` frontends
* ```/api/{provider}/frontends/{frontend}```: ```GET``` a frontend
## <a id="docker"></a> Docker backend ## <a id="docker"></a> Docker backend