k8s/io/kubernetes/pkg/apimachinery.GroupMeta 示例代码

2022-03-03

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

示例1:
registered.go开发语言: Go项目名称: ddysher代码行数: 336
50	// map of group meta for all groups.
51	groupMetaMap map[string]*apimachinery.GroupMeta
52
66		enabledVersions:      map[schema.GroupVersion]struct{}{},
67		groupMetaMap:         map[string]*apimachinery.GroupMeta{},
68		envRequestedVersions: []schema.GroupVersion{},
99// RegisterGroup adds the given group to the list of registered groups.
100func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error {
101	groupName := groupMeta.GroupVersion.Group
178// an error is returned.
179func (m *APIRegistrationManager) Group(group string) (*apimachinery.GroupMeta, error) {
180	groupMeta, found := m.groupMetaMap[group]
220// checking the error returned by the Group() function.
221func (m *APIRegistrationManager) GroupOrDie(group string) *apimachinery.GroupMeta {
222	groupMeta, found := m.groupMetaMap[group]
示例2:
registered.go开发语言: Go项目名称: detiber代码行数: 376
54	// map of group meta for all groups.
55	groupMetaMap map[string]*apimachinery.GroupMeta
56
71		enabledVersions:         map[schema.GroupVersion]struct{}{},
72		groupMetaMap:            map[string]*apimachinery.GroupMeta{},
73		envRequestedVersions:    []schema.GroupVersion{},
104// RegisterGroup adds the given group to the list of registered groups.
105func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error {
106	groupName := groupMeta.GroupVersion.Group
183// an error is returned.
184func (m *APIRegistrationManager) Group(group string) (*apimachinery.GroupMeta, error) {
185	groupMeta, found := m.groupMetaMap[group]
260// checking the error returned by the Group() function.
261func (m *APIRegistrationManager) GroupOrDie(group string) *apimachinery.GroupMeta {
262	groupMeta, found := m.groupMetaMap[group]
示例3:
genericapiserver.go开发语言: Go项目名称: ddysher代码行数: 451
52type APIGroupInfo struct {
53	GroupMeta apimachinery.GroupMeta
54	// Info about the resources in this group. Its a map from version to resource to the storage.
示例4:
genericapiserver.go开发语言: Go项目名称: detiber代码行数: 459
53type APIGroupInfo struct {
54	GroupMeta apimachinery.GroupMeta
55	// Info about the resources in this group. Its a map from version to resource to the storage.
示例5:
group_factory.go开发语言: Go项目名称: ddysher代码行数: 252
166
167func (gmf *GroupMetaFactory) newRESTMapper(scheme *runtime.Scheme, externalVersions []schema.GroupVersion, groupMeta *apimachinery.GroupMeta) meta.RESTMapper {
168	// the list of kinds that are scoped at the root of the api hierarchy
213
214	groupMeta := &apimachinery.GroupMeta{
215		GroupVersion:  preferredExternalVersion,
示例6:
group_factory.go开发语言: Go项目名称: detiber代码行数: 252
166
167func (gmf *GroupMetaFactory) newRESTMapper(scheme *runtime.Scheme, externalVersions []schema.GroupVersion, groupMeta *apimachinery.GroupMeta) meta.RESTMapper {
168	// the list of kinds that are scoped at the root of the api hierarchy
213
214	groupMeta := &apimachinery.GroupMeta{
215		GroupVersion:  preferredExternalVersion,
示例7:
registered.go开发语言: Go项目名称: abhgupta代码行数: 336
50	// map of group meta for all groups.
51	groupMetaMap map[string]*apimachinery.GroupMeta
52
66		enabledVersions:      map[schema.GroupVersion]struct{}{},
67		groupMetaMap:         map[string]*apimachinery.GroupMeta{},
68		envRequestedVersions: []schema.GroupVersion{},
99// RegisterGroup adds the given group to the list of registered groups.
100func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error {
101	groupName := groupMeta.GroupVersion.Group
178// an error is returned.
179func (m *APIRegistrationManager) Group(group string) (*apimachinery.GroupMeta, error) {
180	groupMeta, found := m.groupMetaMap[group]
220// checking the error returned by the Group() function.
221func (m *APIRegistrationManager) GroupOrDie(group string) *apimachinery.GroupMeta {
222	groupMeta, found := m.groupMetaMap[group]
示例8:
genericapiserver.go开发语言: Go项目名称: abhgupta代码行数: 470
51type APIGroupInfo struct {
52	GroupMeta apimachinery.GroupMeta
53	// Info about the resources in this group. Its a map from version to resource to the storage.
示例9:
genericapiserver_test.go开发语言: Go项目名称: ddysher代码行数: 507
170		mapper := meta.NewDefaultRESTMapperFromScheme([]schema.GroupVersion{gv}, interfacesFor, "", sets.NewString(), sets.NewString(), scheme)
171		groupMeta := apimachinery.GroupMeta{
172			GroupVersion:  gv,
示例10:
genericapiserver_test.go开发语言: Go项目名称: detiber代码行数: 507
170		mapper := meta.NewDefaultRESTMapperFromScheme([]schema.GroupVersion{gv}, interfacesFor, "", sets.NewString(), sets.NewString(), scheme)
171		groupMeta := apimachinery.GroupMeta{
172			GroupVersion:  gv,

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