k8s/io/kubernetes/pkg/api.DeleteOptions 示例代码

2022-03-03

以下示例是关于golang中包含api.DeleteOptions用法的示例代码,想了解api.DeleteOptions的具体用法?api.DeleteOptions怎么用?api.DeleteOptions使用的例子?那么可以参考以下10个相关示例代码来学习它的具体使用方法。

示例1:
stop.go开发语言: Go项目名称: amygdala代码行数: 447
47type Reaper interface {
48	Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error
49}
143
144func (reaper *ReplicationControllerReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error {
145	rc := reaper.ReplicationControllers(namespace)
213
214func (reaper *ReplicaSetReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error {
215	rsc := reaper.Extensions().ReplicaSets(namespace)
281
282func (reaper *DaemonSetReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error {
283	ds, err := reaper.Extensions().DaemonSets(namespace).Get(name)
315
316func (reaper *JobReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error {
317	jobs := reaper.Extensions().Jobs(namespace)
示例2:
apiserver_test.go开发语言: Go项目名称: amygdala代码行数: 3299
130		&apiservertesting.Simple{}, &apiservertesting.SimpleList{}, &ListOptions{},
131		&api.DeleteOptions{}, &apiservertesting.SimpleGetOptions{}, &apiservertesting.SimpleRoot{})
132	api.Scheme.AddKnownTypes(grouplessGroupVersion, &api.Pod{})
149		&apiservertesting.Simple{}, &apiservertesting.SimpleList{}, &ListOptions{},
150		&api.DeleteOptions{}, &apiservertesting.SimpleGetOptions{}, &apiservertesting.SimpleRoot{},
151		&SimpleXGSubresource{})
175		&apiservertesting.Simple{}, &apiservertesting.SimpleList{}, &ListOptions{},
176		&api.DeleteOptions{}, &apiservertesting.SimpleGetOptions{}, &apiservertesting.SimpleRoot{})
177	api.Scheme.AddKnownTypes(newGroupVersion, &v1.Pod{})
360	deleted       string
361	deleteOptions *api.DeleteOptions
362
461
462func (storage *SimpleRESTStorage) Delete(ctx api.Context, id string, options *api.DeleteOptions) (runtime.Object, error) {
463	storage.checkContext(ctx)
示例3:
resthandler.go开发语言: Go项目名称: amygdala代码行数: 1038
723
724		options := &api.DeleteOptions{}
725		if checkBody {
840
841		options := &api.DeleteOptions{}
842		if checkBody {
示例4:
conversion_generated.go开发语言: Go项目名称: amygdala代码行数: 6785
559
560func autoConvert_api_DeleteOptions_To_v1_DeleteOptions(in *api.DeleteOptions, out *DeleteOptions, s conversion.Scope) error {
561	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
562		defaulting.(func(*api.DeleteOptions))(in)
563	}
572
573func Convert_api_DeleteOptions_To_v1_DeleteOptions(in *api.DeleteOptions, out *DeleteOptions, s conversion.Scope) error {
574	return autoConvert_api_DeleteOptions_To_v1_DeleteOptions(in, out, s)
3863
3864func autoConvert_v1_DeleteOptions_To_api_DeleteOptions(in *DeleteOptions, out *api.DeleteOptions, s conversion.Scope) error {
3865	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
3876
3877func Convert_v1_DeleteOptions_To_api_DeleteOptions(in *DeleteOptions, out *api.DeleteOptions, s conversion.Scope) error {
3878	return autoConvert_v1_DeleteOptions_To_api_DeleteOptions(in, out, s)
示例5:
componentstatus.go开发语言: Go项目名称: amygdala代码行数: 126
33	Update(*api.ComponentStatus) (*api.ComponentStatus, error)
34	Delete(name string, options *api.DeleteOptions) error
35	DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
77// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
78func (c *componentStatuses) Delete(name string, options *api.DeleteOptions) error {
79	return c.client.Delete().
87// DeleteCollection deletes a collection of objects.
88func (c *componentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
89	return c.client.Delete().
示例6:
configmap.go开发语言: Go项目名称: amygdala代码行数: 135
33	Update(*api.ConfigMap) (*api.ConfigMap, error)
34	Delete(name string, options *api.DeleteOptions) error
35	DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
81// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
82func (c *configMaps) Delete(name string, options *api.DeleteOptions) error {
83	return c.client.Delete().
92// DeleteCollection deletes a collection of objects.
93func (c *configMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
94	return c.client.Delete().
示例7:
endpoints.go开发语言: Go项目名称: amygdala代码行数: 135
33	Update(*api.Endpoints) (*api.Endpoints, error)
34	Delete(name string, options *api.DeleteOptions) error
35	DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
81// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
82func (c *endpoints) Delete(name string, options *api.DeleteOptions) error {
83	return c.client.Delete().
92// DeleteCollection deletes a collection of objects.
93func (c *endpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
94	return c.client.Delete().
示例8:
event.go开发语言: Go项目名称: amygdala代码行数: 135
33	Update(*api.Event) (*api.Event, error)
34	Delete(name string, options *api.DeleteOptions) error
35	DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
81// Delete takes name of the event and deletes it. Returns an error if one occurs.
82func (c *events) Delete(name string, options *api.DeleteOptions) error {
83	return c.client.Delete().
92// DeleteCollection deletes a collection of objects.
93func (c *events) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
94	return c.client.Delete().
示例9:
limitrange.go开发语言: Go项目名称: amygdala代码行数: 135
33	Update(*api.LimitRange) (*api.LimitRange, error)
34	Delete(name string, options *api.DeleteOptions) error
35	DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
81// Delete takes name of the limitRange and deletes it. Returns an error if one occurs.
82func (c *limitRanges) Delete(name string, options *api.DeleteOptions) error {
83	return c.client.Delete().
92// DeleteCollection deletes a collection of objects.
93func (c *limitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
94	return c.client.Delete().
示例10:
namespace.go开发语言: Go项目名称: amygdala代码行数: 139
34	UpdateStatus(*api.Namespace) (*api.Namespace, error)
35	Delete(name string, options *api.DeleteOptions) error
36	DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
90// Delete takes name of the namespace and deletes it. Returns an error if one occurs.
91func (c *namespaces) Delete(name string, options *api.DeleteOptions) error {
92	return c.client.Delete().
100// DeleteCollection deletes a collection of objects.
101func (c *namespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
102	return c.client.Delete().

本文地址:https://www.itbaoku.cn/snippets/415644.html