k8s/io/kubernetes/pkg/api/unversioned.ListMeta 示例代码

2022-03-03

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

示例1:
deep_copy_generated.go开发语言: Go项目名称: amygdala代码行数: 2775
46
47func deepCopy_unversioned_ListMeta(in unversioned.ListMeta, out *unversioned.ListMeta, c *conversion.Cloner) error {
48	out.SelfLink = in.SelfLink
示例2:
types.go开发语言: Go项目名称: amygdala代码行数: 940
165	unversioned.TypeMeta `json:",inline"`
166	unversioned.ListMeta `json:"metadata,omitempty"`
167
192	// Standard list metadata.
193	unversioned.ListMeta `json:"metadata,omitempty"`
194
353	unversioned.TypeMeta `json:",inline"`
354	unversioned.ListMeta `json:"metadata,omitempty"`
355
484	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
485	unversioned.ListMeta `json:"metadata,omitempty"`
486
494	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
495	unversioned.ListMeta `json:"metadata,omitempty"`
496	// Items is a list of third party objects
示例3:
deep_copy_generated.go开发语言: Go项目名称: amygdala代码行数: 2064
46
47func deepCopy_unversioned_ListMeta(in unversioned.ListMeta, out *unversioned.ListMeta, c *conversion.Cloner) error {
48	out.SelfLink = in.SelfLink
示例4:
types.go开发语言: Go项目名称: amygdala代码行数: 1037
162	// Standard list metadata.
163	unversioned.ListMeta `json:"metadata,omitempty"`
164
190	// Standard list metadata.
191	unversioned.ListMeta `json:"metadata,omitempty"`
192
358	// Standard list metadata.
359	unversioned.ListMeta `json:"metadata,omitempty"`
360
492	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
493	unversioned.ListMeta `json:"metadata,omitempty"`
494
503	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
504	unversioned.ListMeta `json:"metadata,omitempty"`
505
示例5:
deep_copy_generated.go开发语言: Go项目名称: amygdala代码行数: 1233
46
47func deepCopy_unversioned_ListMeta(in unversioned.ListMeta, out *unversioned.ListMeta, c *conversion.Cloner) error {
48	out.SelfLink = in.SelfLink
示例6:
deep_copy_generated.go开发语言: Go项目名称: amygdala代码行数: 230
29
30func deepCopy_unversioned_ListMeta(in unversioned.ListMeta, out *unversioned.ListMeta, c *conversion.Cloner) error {
31	out.SelfLink = in.SelfLink
示例7:
get_test.go开发语言: Go项目名称: amygdala代码行数: 867
44	pods := &api.PodList{
45		ListMeta: unversioned.ListMeta{
46			ResourceVersion: "15",
59	svc := &api.ServiceList{
60		ListMeta: unversioned.ListMeta{
61			ResourceVersion: "16",
73	rc := &api.ReplicationControllerList{
74		ListMeta: unversioned.ListMeta{
75			ResourceVersion: "17",
277	pods := &api.PodList{
278		ListMeta: unversioned.ListMeta{
279			ResourceVersion: "15",
示例8:
reflector_test.go开发语言: Go项目名称: amygdala代码行数: 404
53		ListFunc: func() (runtime.Object, error) {
54			return &api.PodList{ListMeta: unversioned.ListMeta{ResourceVersion: "1"}}, nil
55		},
79		ListFunc: func() (runtime.Object, error) {
80			return &api.PodList{ListMeta: unversioned.ListMeta{ResourceVersion: "1"}}, nil
81		},
239		ListFunc: func() (runtime.Object, error) {
240			return &api.PodList{ListMeta: unversioned.ListMeta{ResourceVersion: "1"}}, nil
241		},
282	mkList := func(rv string, pods ...*api.Pod) *api.PodList {
283		list := &api.PodList{ListMeta: unversioned.ListMeta{ResourceVersion: rv}}
284		for _, pod := range pods {
392		ListFunc: func() (runtime.Object, error) {
393			return &api.PodList{ListMeta: unversioned.ListMeta{ResourceVersion: "0"}}, nil
394		},
示例9:
meta.go开发语言: Go项目名称: amygdala代码行数: 82
54// TODO: allow runtime.Unknown to extract this object
55func ListMetaFor(obj runtime.Object) (*unversioned.ListMeta, error) {
56	v, err := conversion.EnforcePtr(obj)
59	}
60	var meta *unversioned.ListMeta
61	err = runtime.FieldPtr(v, "ListMeta", &meta)
示例10:
types.go开发语言: Go项目名称: amygdala代码行数: 2539
323	unversioned.TypeMeta `json:",inline"`
324	unversioned.ListMeta `json:"metadata,omitempty"`
325	Items                []PersistentVolume `json:"items"`
343	unversioned.TypeMeta `json:",inline"`
344	unversioned.ListMeta `json:"metadata,omitempty"`
345	Items                []PersistentVolumeClaim `json:"items"`
1085	unversioned.TypeMeta `json:",inline"`
1086	unversioned.ListMeta `json:"metadata,omitempty"`
1087
1350	unversioned.TypeMeta `json:",inline"`
1351	unversioned.ListMeta `json:"metadata,omitempty"`
1352
1404	unversioned.TypeMeta `json:",inline"`
1405	unversioned.ListMeta `json:"metadata,omitempty"`
1406

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