跳到主要内容

74.retry

2281

Add some retry to the service proxy

2340

efactor kube auth

2355

Add support for the a clusters cloud interface to cloud provider.

2282

Automatic API generation via go-restful

Partially addresses #1052.

There's lots more work left to do here, but I got this working, so I thought I'd share it.

go-restful provides a more structured handler registration mechanism, with the ability to document a number of aspects of the API. The object definitions are extracted via reflection and their descriptions are extracted from field tags (added by the author of go-restful upon my request). It uses https://github.com/swagger-api/swagger-ui for the doc UI, and also provides a discovery API that can be used to query available endpoints and json schemas.

In order for the initial version of this to be merged, two main things need to be done:

Fix apiserver_test and make all the tests pass Update and merge the PR that adds go-restful to Godeps Beyond that, I'd like to iterate on cleaning this up and adding documentation in other PRs:

Customize the swagger UI for our needs Figure out how to copy https://github.com/swagger-api/swagger-ui/dist to the master Figure out what to do with the custom verbs (watch, proxy, redirect) Convert all handlers to native go-restful style Convert handler parameters to go-restful parameters Perhaps split REST handlers into per-verb handlers Add descriptions to all handlers Add description tags to all types.go object fields Add documentation of other details (return codes, input/output mime types, etc.) Fix go-restful bugs