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

2022-03-03

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

示例1:
get_test.go开发语言: Go项目名称: kubernetes代码行数: 489
38	pods := &api.PodList{
39		ListMeta: api.ListMeta{
40			ResourceVersion: "15",
59	svc := &api.ServiceList{
60		ListMeta: api.ListMeta{
61			ResourceVersion: "16",
73	rc := &api.ReplicationControllerList{
74		ListMeta: api.ListMeta{
75			ResourceVersion: "17",
示例2:
etcd_tools_test.go开发语言: Go项目名称: kubernetes代码行数: 611
101	expect := api.PodList{
102		ListMeta: api.ListMeta{ResourceVersion: "10"},
103		Items: []api.Pod{
183	expect := api.PodList{
184		ListMeta: api.ListMeta{ResourceVersion: "10"},
185		Items: []api.Pod{
254	expect := api.PodList{
255		ListMeta: api.ListMeta{ResourceVersion: "10"},
256		Items: []api.Pod{
示例3:
fuzzer.go开发语言: Go项目名称: kubernetes代码行数: 246
87		},
88		func(j *api.ListMeta, c fuzz.Continue) {
89			j.ResourceVersion = strconv.FormatUint(c.RandUint64(), 10)
示例4:
builder_test.go开发语言: Go项目名称: kubernetes代码行数: 699
84	pods := &api.PodList{
85		ListMeta: api.ListMeta{
86			ResourceVersion: "15",
105	svc := &api.ServiceList{
106		ListMeta: api.ListMeta{
107			ResourceVersion: "16",
示例5:
reflector_test.go开发语言: Go项目名称: kubernetes代码行数: 249
123		ListFunc: func() (runtime.Object, error) {
124			return &api.PodList{ListMeta: api.ListMeta{ResourceVersion: "1"}}, nil
125		},
166	mkList := func(rv string, pods ...*api.Pod) *api.PodList {
167		list := &api.PodList{ListMeta: api.ListMeta{ResourceVersion: rv}}
168		for _, pod := range pods {
示例6:
api_test.go开发语言: Go项目名称: kubernetes代码行数: 346
82	fakeClient.ServiceList = api.ServiceList{
83		ListMeta: api.ListMeta{ResourceVersion: "2"},
84		Items: []api.Service{
244	fakeClient.EndpointsList = api.EndpointsList{
245		ListMeta: api.ListMeta{ResourceVersion: "2"},
246		Items: []api.Endpoints{
示例7:
etcd_tools_test.go开发语言: Go项目名称: ashumeow代码行数: 486
92	expect := api.PodList{
93		ListMeta: api.ListMeta{ResourceVersion: "10"},
94		Items: []api.Pod{
144	expect := api.PodList{
145		ListMeta: api.ListMeta{ResourceVersion: "10"},
146		Items: []api.Pod{
190	expect := api.PodList{
191		ListMeta: api.ListMeta{ResourceVersion: "10"},
192		Items: []api.Pod{
示例8:
client_test.go开发语言: Go项目名称: kubernetes代码行数: 794
702		Request:  testRequest{Method: "GET", Path: "/minions"},
703		Response: Response{StatusCode: 200, Body: &api.NodeList{ListMeta: api.ListMeta{ResourceVersion: "1"}}},
704	}
示例9:
rest_test.go开发语言: Go项目名称: kubernetes代码行数: 99
76	registry.EndpointsList = api.EndpointsList{
77		ListMeta: api.ListMeta{ResourceVersion: "1"},
78		Items: []api.Endpoints{
示例10:
result.go开发语言: Go项目名称: kubernetes代码行数: 203
145	return &api.List{
146		ListMeta: api.ListMeta{
147			ResourceVersion: version,

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