eliminate indirection from type registration

This commit is contained in:
David Eads
2018-04-24 08:21:23 -04:00
parent 3fb88a23d9
commit e7fbbe0e3c
74 changed files with 265 additions and 536 deletions

View File

@@ -30,11 +30,11 @@ import (
)
func init() {
Install(legacyscheme.GroupFactoryRegistry, legacyscheme.Registry, legacyscheme.Scheme)
Install(legacyscheme.Registry, legacyscheme.Scheme)
}
// Install registers the API group and adds types to a scheme
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
func Install(registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
if err := announced.NewGroupMetaFactory(
&announced.GroupMetaFactoryArgs{
GroupName: authentication.GroupName,
@@ -46,7 +46,7 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme,
v1.SchemeGroupVersion.Version: v1.AddToScheme,
},
).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
).Register(registry, scheme); err != nil {
panic(err)
}
}