本文整理汇总了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)
}