以下示例是关于golang中包含apimachinery.GroupMeta用法的示例代码,想了解apimachinery.GroupMeta的具体用法?apimachinery.GroupMeta怎么用?apimachinery.GroupMeta使用的例子?那么可以参考以下10个相关示例代码来学习它的具体使用方法。
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]
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]
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.
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.
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,
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,
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]
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.
170 mapper := meta.NewDefaultRESTMapperFromScheme([]schema.GroupVersion{gv}, interfacesFor, "", sets.NewString(), sets.NewString(), scheme)
171 groupMeta := apimachinery.GroupMeta{
172 GroupVersion: gv,
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