本文整理匯總了Golang中k8s/io/kubernetes/pkg/client/unversioned.NewRequest函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewRequest函數的具體用法?Golang NewRequest怎麽用?Golang NewRequest使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了NewRequest函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Delete
func (c *RESTClient) Delete() *unversioned.Request {
return unversioned.NewRequest(c, "DELETE", &url.URL{Host: "localhost"}, testapi.Default.Version(), c.Codec)
}
示例2: Patch
func (c *RESTClient) Patch(_ api.PatchType) *unversioned.Request {
return unversioned.NewRequest(c, "PATCH", &url.URL{Host: "localhost"}, testapi.Default.Version(), c.Codec)
}
示例3: request
func (c *RESTClient) request(verb string) *unversioned.Request {
return unversioned.NewRequest(c, verb, &url.URL{Host: "localhost"}, "", unversioned.ContentConfig{GroupVersion: testapi.Default.GroupVersion(), Codec: c.Codec}, nil)
}
示例4: request
func (c *RESTClient) request(verb string) *unversioned.Request {
return unversioned.NewRequest(c, verb, &url.URL{Host: "localhost"}, "", *testapi.Default.GroupVersion(), c.Codec, nil)
}
示例5: Post
func (c *RESTClient) Post() *unversioned.Request {
return unversioned.NewRequest(c, "POST", &url.URL{Host: "localhost"}, *testapi.Default.GroupVersion(), c.Codec)
}