Commit Graph

41 Commits (34924af63d8c049f740875f1a0ef69eb13ca0eb8)

Author SHA1 Message Date
Clayton Coleman eb0eff69fe Move watch to being a resthandler resource and expose it on LIST
GET /pods?watch=true&resourceVersion=10

will now function equivalent to GET /watch/pods.
2015-03-27 15:03:58 -04:00
Clayton Coleman 1618c39a46 Convert List query parameters via object conversion
Convert url.Values -> an object, with appropriate versioning. ListOptions
should also expose parameter names to swagger.
2015-03-27 15:03:57 -04:00
Clayton Coleman d46087db50 Move REST* interfaces into pkg/api/rest
Dependency chain is now api -> api/rest -> apiserver.  Makes the
interfaces much cleaner to read, and cleans up some inconsistenties
that crept in along the way.
2015-03-23 16:52:21 -04:00
Brendan Burns 6d763dce2b start normalizing error handling in watch. 2015-03-17 21:04:55 -07:00
Daniel Smith 05ea93f985 Merge pull request #5147 from a-robinson/func
Re-add the defer statements around the monitor() calls in the apiserver.
2015-03-06 15:31:45 -08:00
Alex Robinson 60f0e9d673 Fix the broken calls to the monitor() by having it take arguments as pointers.
This is needed for the changes to various labels from later in the function
to be picked up.
2015-03-06 23:16:44 +00:00
Daniel Smith c4822dc060 Revert "Revert "Adding converter functions to convert field label selectors to internal version before matching""
This reverts commit 5f35a67002.
2015-03-02 15:00:09 -08:00
Zach Loafman 5f35a67002 Revert "Adding converter functions to convert field label selectors to internal version before matching" 2015-02-28 11:42:49 -08:00
nikhiljindal 48e7945f65 Versioning the field selectors 2015-02-27 16:10:59 -08:00
nikhiljindal 905a3f7909 Updating the handlers to accept full request path rather than a trimmed one 2015-02-24 00:37:20 -08:00
Daniel Smith ca5a73ac6b remove redundant func() 2015-02-17 15:58:18 -08:00
Clayton Coleman d167c11b59 Remove layers of indirection between apiinstaller and resthandler
Make the RESTHandler feel more go-restful, set the stage for adding
new types of subresource collections.
2015-02-11 16:26:06 -05:00
Alex Robinson ab62b689a5 Add monitoring instrumentation for the remaining HTTP handlers in the apiserver. 2015-02-10 23:19:49 +00:00
deads2k 1c9216a45e clarify api request information 2015-02-04 13:36:01 -05:00
Clayton Coleman 22c99c98e2 Split RESTStorage into separate interfaces
Omit unimplemented interfaces from Swagger
2015-01-12 12:19:45 -05:00
Clayton Coleman 31fc19efe9 Watching on invalid label/field selectors should error 2015-01-07 14:38:38 -05:00
derekwaynecarr 7cf664439f Move namespace from query param to path part 2014-12-16 15:55:47 -05:00
Eric Paris 4e95104953 update code.goole.com/p/go.net to golang.org/x/net
https://groups.google.com/forum/#!topic/golang-nuts/eD8dh3T9yyA
2014-11-16 22:10:24 -05:00
Daniel Smith 4196780eda Add self links to objects sent down the watch channel. 2014-11-05 17:22:18 -08:00
derekwaynecarr dda19071e3 Fix watch by namespace 2014-10-30 12:56:50 -04:00
Clayton Coleman 82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
derekwaynecarr 3e685674e7 Add context object to interfaces 2014-09-26 11:50:34 -04:00
Clayton Coleman e3da2ba2c8 Cleanup watch encoding (remove dupe Encoding)
Move standard watch encode / decode streams to use
runtime.RawExtension and embed API decoding based on
a provided codec.
2014-09-22 16:03:07 -04:00
Jessica Forrester f2732f18a7 Match any Connection header that contains the Upgrade token for websockets 2014-09-18 09:26:21 -04:00
Clayton Coleman 61e3ce7ddc Make runtime less global for Codec
* Make Codec separate from Scheme
* Move EncodeOrDie off Scheme to take a Codec
* Make Copy work without a Codec
* Create a "latest" package that imports all versions and
  sets global defaults for "most recent encoding"
  * v1beta1 is the current "latest", v1beta2 exists
  * Kill DefaultCodec, replace it with "latest.Codec"
  * This updates the client and etcd to store the latest known version
* EmbeddedObject is per schema and per package now
* Move runtime.DefaultScheme to api.Scheme
* Split out WatchEvent since it's not an API object today, treat it
like a special object in api
* Kill DefaultResourceVersioner, instead place it on "latest" (as the
  package that understands all packages)
* Move objDiff to runtime.ObjectDiff
2014-09-16 16:26:43 -04:00
Jessica Forrester 0f2b8f4f9f Create passthroughLogger when LogOf is called and request has no logger 2014-09-11 16:48:06 -04:00
Jessica Forrester 0cac1c5f79 Switch LogOf from panicking when logger is missing to creating logger with the defaults.
Update CORS tests to a table-based test and cover more cases.
2014-09-09 17:50:18 -04:00
Jessica Forrester becf6ca4e7 Move RecoverPanics to be the top level wrapped handler. Add new method to be sure a logger has been generated instead of assuming one has. Move regexp list compilation into a utility and pass regexp list into CORS. 2014-09-09 17:50:18 -04:00
Daniel Smith 0d30a656ef Do interface{} -> runtime.Object rename everywhere 2014-09-07 22:19:24 -07:00
Daniel Smith 7790961011 Rename Object to EmbeddedObject 2014-09-05 14:43:35 -07:00
Daniel Smith a63966e73c Combine pkg/apitools and pkg/api/common and call the result pkg/runtime 2014-09-02 11:15:44 -07:00
Daniel Smith 099c8fd36f Propagate rename; tests pass again. 2014-09-02 10:42:06 -07:00
Vojtech Vitek (V-Teq) 59f58cd043 Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Daniel Smith 9050c819dc Merge pull request #722 from smarterclayton/improve_errors
Normalize apiserver error handling of standard errors
2014-08-11 12:43:06 -07:00
Clayton Coleman d419eedb06 Watch handler not returning after 404 2014-08-09 10:46:56 -04:00
Clayton Coleman 0083fae453 Provide helpers and tests for common error types
Unify error handling in apiserver into a single path - RESTStorage
objects must provide appropriate errors individually.  Ensure ALL
errors which can be traced to logical faults with RESTStorage are
returned as api.Status objects.
2014-08-08 19:44:47 -04:00
Daniel Smith 49cded3800 Simplify ResourceWatcher interface to one function. 2014-08-08 14:09:13 -07:00
Daniel Smith 283fdba6ab Add more parameters to Watch
* Add labels selector (same as List)
* Add fields selector
 * Plan to let you select pods by Host and/or Status
* Add resourceVersion to let you resume a watch where you left off.
2014-08-08 14:09:13 -07:00
Clayton Coleman a74fac7d70 Centralize path magic in apiserver into the New method
Make OperationHandler and WatchHandler properly encapsulate their
concerns and make them not depend on the global path
2014-08-08 16:33:44 -04:00
Clayton Coleman e64a393e1a Move handle* methods to their respective locations
Fix names
2014-07-30 17:15:09 -04:00
Clayton Coleman b911d9265a Split watch 2014-07-30 17:14:06 -04:00