mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 04:03:20 +00:00
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.
This commit is contained in:
@@ -1170,7 +1170,8 @@ type DeleteOptions struct {
|
||||
GracePeriodSeconds *int64 `json:"gracePeriodSeconds"`
|
||||
}
|
||||
|
||||
// ListOptions is the query options to a standard REST list call
|
||||
// ListOptions is the query options to a standard REST list call, and has future support for
|
||||
// watch calls.
|
||||
type ListOptions struct {
|
||||
TypeMeta `json:",inline"`
|
||||
|
||||
@@ -1178,6 +1179,10 @@ type ListOptions struct {
|
||||
LabelSelector labels.Selector
|
||||
// A selector based on fields
|
||||
FieldSelector fields.Selector
|
||||
// If true, watch for changes to this list
|
||||
Watch bool
|
||||
// The resource version to watch (no effect on list yet)
|
||||
ResourceVersion string
|
||||
}
|
||||
|
||||
// Status is a return value for calls that don't return other objects.
|
||||
|
@@ -993,6 +993,10 @@ type ListOptions struct {
|
||||
LabelSelector string `json:"labels" description:"a selector to restrict the list of returned objects by their labels; defaults to everything"`
|
||||
// A selector based on fields
|
||||
FieldSelector string `json:"fields" description:"a selector to restrict the list of returned objects by their fields; defaults to everything"`
|
||||
// If true, watch for changes to the selected resources
|
||||
Watch bool `json:"watch" description:"watch for changes to the described resources and return them as a stream of add, update, and remove notifications; specify resourceVersion"`
|
||||
// The desired resource version to watch
|
||||
ResourceVersion string `json:"resourceVersion" description:"when specified with a watch call, shows changes that occur after that particular version of a resource; defaults to changes from the beginning of history"`
|
||||
}
|
||||
|
||||
// Status is a return value for calls that don't return other objects.
|
||||
|
@@ -1007,6 +1007,10 @@ type ListOptions struct {
|
||||
LabelSelector string `json:"labels" description:"a selector to restrict the list of returned objects by their labels; defaults to everything"`
|
||||
// A selector based on fields
|
||||
FieldSelector string `json:"fields" description:"a selector to restrict the list of returned objects by their fields; defaults to everything"`
|
||||
// If true, watch for changes to the selected resources
|
||||
Watch bool `json:"watch" description:"watch for changes to the described resources and return them as a stream of add, update, and remove notifications; specify resourceVersion"`
|
||||
// The desired resource version to watch
|
||||
ResourceVersion string `json:"resourceVersion" description:"when specified with a watch call, shows changes that occur after that particular version of a resource; defaults to changes from the beginning of history"`
|
||||
}
|
||||
|
||||
// Status is a return value for calls that don't return other objects.
|
||||
|
@@ -1166,6 +1166,10 @@ type ListOptions struct {
|
||||
LabelSelector string `json:"labelSelector" description:"a selector to restrict the list of returned objects by their labels; defaults to everything"`
|
||||
// A selector based on fields
|
||||
FieldSelector string `json:"fieldSelector" description:"a selector to restrict the list of returned objects by their fields; defaults to everything"`
|
||||
// If true, watch for changes to the selected resources
|
||||
Watch bool `json:"watch" description:"watch for changes to the described resources and return them as a stream of add, update, and remove notifications; specify resourceVersion"`
|
||||
// The desired resource version to watch
|
||||
ResourceVersion string `json:"resourceVersion" description:"when specified with a watch call, shows changes that occur after that particular version of a resource; defaults to changes from the beginning of history"`
|
||||
}
|
||||
|
||||
// Status is a return value for calls that don't return other objects.
|
||||
|
Reference in New Issue
Block a user