mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 20:50:24 +00:00
Update references from Path() to the appropriate segment use
This commit is contained in:
@@ -59,7 +59,9 @@ type RESTClient struct {
|
||||
|
||||
// NewRESTClient creates a new RESTClient. This client performs generic REST functions
|
||||
// such as Get, Put, Post, and Delete on specified paths. Codec controls encoding and
|
||||
// decoding of responses from the server.
|
||||
// decoding of responses from the server. If the namespace should be specified as part
|
||||
// of the path (after the resource), set namespaceInPath to true, otherwise it will be
|
||||
// passed as "namespace" in the query string.
|
||||
func NewRESTClient(baseURL *url.URL, c runtime.Codec, namespaceInPath bool) *RESTClient {
|
||||
base := *baseURL
|
||||
if !strings.HasSuffix(base.Path, "/") {
|
||||
@@ -129,7 +131,7 @@ func (c *RESTClient) Delete() *Request {
|
||||
|
||||
// PollFor makes a request to do a single poll of the completion of the given operation.
|
||||
func (c *RESTClient) Operation(name string) *Request {
|
||||
return c.Get().Path("operations").Path(name).Sync(false).NoPoll()
|
||||
return c.Get().Resource("operations").Name(name).Sync(false).NoPoll()
|
||||
}
|
||||
|
||||
func (c *RESTClient) DefaultPoll(name string) (*Request, bool) {
|
||||
|
Reference in New Issue
Block a user